Getting Started

AgM9216 IVI Driver Reference |
Getting Started | Agilent Technologies

Welcome to the AgM9216 version 1.0.1.0 IVI driver. Agilent's IVI drivers simplify the creation and maintenance of instrument control applications in a variety of development environments. IVI drivers allow you to programmatically control your instrumentation while providing a greater degree of instrument interchangeability and code reuse.

IVI Overview

General, basic information on IVI driver features as well as installing and configuring IVI drivers for use in an end-user application.
  • IVI Backgrounder - Presents an overview of IVI topics and concepts for driver developers including introductory information on the IVI Foundation standards and specifications.
  • Installation - Explains where IVI drivers are installed and what components are required.
  • IVI Compliance Information - Provides IVI-required compliance information for the AgM9216 driver.
  • Configuring the Driver - Provides information on using the IVI Configuration Store with the AgM9216 driver.

Programming with the AgM9216 Driver

Basics of programming this driver including example code. How to: Reference the Driver, Create an Instance of the Driver, Initialize the Driver, and Access Items of Various Data Types
  • Programming with the IVI-COM Driver - Using the IVI-COM driver in the following application development environments: Visual C#, Visual C++, Visual Basic.NET, Visual Basic 6, Agilent VEE Pro, LabVIEW, MATLAB
  • Programming with the IVI-C Driver - Using the IVI-C driver in the following application development environments: Visual C++, LabWindow/CVI, LabVIEW, MATLAB, .NET

AgM9216 Driver Reference

Detailed help on each item in the driver.
  • IVI-COM Driver Reference
  • IVI-C Driver Reference

Web Sites

  • Agilent Technologies Home Page
    • IVI Drivers & Components Downloads
    • Agilent I/O Libraries Suite
    • GPIB, USB, & Instrument Control Products
    • Agilent VEE Pro
    • Technical Support, Manuals, & Downloads
    • Contact Agilent Test & Measurement
  • IVI Foundation - Usage Guides, Specifications, Shared Components Downloads
  • MSDN Online
Copyright 2011 Agilent Technologies. All rights reserved.


IVI Backgrounder

[image]

AgM9216 IVI Driver Reference Agilent Technologies
IVI Backgrounder

The IVI Foundation is an open consortium founded in 1998 to promote standards for programming test instruments. Composed primarily of instrument manufacturers, end-users, software vendors, and system integrators, the Foundation strives to create specifications that govern the development of instrument drivers.

IVI-compliant drivers offer a number of benefits, such as a consistent programming interface, better performance, seamless integration into a wide variety of development environments, and interchangeability. Interchangeability refers to the ability of an end user to replace one IVI driver in an application program with another IVI driver from a different vendor, without modifying or even recompiling the application program. To achieve interchangeability, IVI driver developers must carefully follow all of the requirements laid out in the IVI Foundation specifications.

The following sections present an overview of some of the most important IVI topics for driver developers. This document does not attempt to reproduce all of the details contained in the IVI specifications. For complete information on IVI and for the most up-to-date versions of all IVI specifications and components, visit the IVI Foundation web site.

In This Section

What All IVI Drivers Do -- Inherent Capabilities

Explains how to basic functionality that all IVI drivers support.

Two Flavors of IVI -- IVI-COM and IVI-C

Compares IVI-COM and IVI-C drivers.

How IVI Drivers Provide Interchangeability

Explains the basics of how interchangeability works with IVI-COM and IVI-C.

Instrument-Specific Capabilities

Provides a brief explanation of non-interchangeable device-specific functionality in IVI drivers.

IVI Shared Components

Provides an introduction to the shared software components required for an IVI-based system.

Repeated Capabilities

Explains IVI repeated capabilities along with the notions of physical and virtual names.

LXI Fundamentals

Presents an introduction to the LXI standards and how they relate to IVI drivers.


What All IVI Drivers Do -- Inherent Capabilities

[image]

AgM9216 IVI Driver Reference Agilent Technologies
What All IVI Drivers Do -- Inherent Capabilities

The IVI Foundation has established a set of functions and attributes that all IVI drivers must support -- irrespective of which IVI instrument class the driver supports. These common functions and attributes are called IVI inherent capabilities and they are documented in IVI-3.2 -- Inherent Capabilities Specification. Importantly, drivers that do not support any IVI instrument class must still support the IVI inherent capabilities.

Having a common set of basic functionality that all IVI drivers must support ensures that end users have a standard, recognizable way to perform basic operations with the IVI driver. If an end user has programmed with an IVI driver of any type before, they will immediately know how to perform at least basic tasks with any new IVI driver they encounter. Some of the tasks that fall under the inherent capabilities specification are:

  • Initializing the driver.
  • Querying errors from the driver.
  • Enabling standard driver features, such as simulation, state caching, and range checking.
  • Identifying the capabilities of the driver, such as the supported instrument classes, capability groups.
  • Reading driver and instrument identification information.
  • Performing instrument self-test and reset operations.

A detailed description of the IVI inherent capabilities can be found in the Reference section under the topic IviDriver.

Standard Driver Features

IVI drivers may offer several different features whose behavior has been standardized by the IVI Foundation. Although these are referred to as standard driver features, they are not all required to be supported by an IVI driver, as shown in the table below:

Feature | Required
State caching | No
Range checking | No
Coercion and coercion recording | No
Interchangeability checking | No
Simulation | Yes

The remainder of this topic discusses each driver feature in detail.

State Caching -- Optional

As a means to offer better performance in customer test applications, IVI drivers often support a feature known as state caching. The principle of state caching is quite simple, although in practice it can be extraordinarily difficult to implement properly.

When a end user enables state caching for an IVI driver, the driver attempts to determine if new settings passed into the driver are different from the actual instrument state. In this way, I/O traffic between the driver and the instrument is reduced, as fewer I/O calls are performed.

In the simplest example of when state caching improves performance, consider what happens when a user passes identical values several times in a row for the frequency property on a function generator driver. Without state caching, each call into the driver would result in an I/O function call to the instrument, whereas a driver performing state caching would detect that subsequent calls to the frequency property were redundant and should not result in any communication with the instrument. Correspondingly, the driver can "remember" the last known value for instrument properties so that queries can be performed by retrieving data from computer memory, rather than by performing instrument I/O.

As with caching schemes in other types of software systems, IVI driver state caching is frought with potential pitfalls. The chief challenge in properly implementing state caching is maintaining cache coherency. Complex instruments often have complex couplings between instrument settings, making it difficult for the driver to track whether or not settings stored in the driver cache are valid. Consequently, many instrument vendors choose not to implement state caching in the driver.

For more information on state caching, see IVI-3.1: Driver Architecture Specification.

Range Checking -- Optional

Range checking in IVI drivers simply refers to the ability for the driver to test whether or not input values passed to the driver are within an acceptable range. End users typically use range checking during debugging and, after validation is complete, disable it to maximize performance.

For more information on range checking, see IVI-3.1: Driver Architecture Specification.

Coercion and Coercion Recording -- Optional

Instruments often accept only a discrete set of values for certain properties. For example, a DMM might only accept values such as 10 V, 100 V, 300 V for the voltage range setting. These discrete value sets will necessarily be different for different vendor's instruments. An Agilent® DMM may accept 10 V, 100 V, 300 V while a Fluke DMM accepts 20 V, 200 V, and 400 V. As a result, IVI class specifications are forced to define such real-valued properties as accepting a continuous range of values, even though the underlying instrument only accepts a discrete set of values.

Following along with the DMM voltage range example, if a user sends a value of 150 V for the voltage range, the instrument will internally coerce the value to one of the accepted values, such as 300 V. To maximize interchangeability, the IVI class specifications provide guidance on how IVI drivers should coerce user requested values for specific properties.

To aid end users in building interchangeable applications, IVI drivers may implement a feature called coercion recording. If a user enables coercion recording, the IVI driver retains a log of each user value that it coerces. Standard functions in the IVI inherent capabilities provide the user with access to the driver's coercion log.

For more information on coercion, see IVI-3.1: Driver Architecture Specification.

Interchangeability checking -- Optional

A program written using an IVI driver will not be interchangeable if the program relies upon default settings within the instrument. This is because different instruments will have different default values for many important settings. Repeatable results can only be obtained if all of the instrument settings on which an operation depends are in a user-specified state.

IVI drivers may implement a feature called interchangeability checking to ensure that driver attributes relevant to a particular operation are in a user-specified state whenever that operation is performed. The IVI instrument class specifications all include class-specific sections detailing which driver attributes need to be in a known state for particular operations. The driver can then track these attributes and report a warning if one or more are not set explicitly by the client program before an important operation is performed.

Standard functions in the IVI inherent capabilities provide the user with the ability to enable interchangeability checking in the driver and to retrieve any warnings that occur. Typically, this feature is only used during development and debug of an application and disabled during normal operation, so as not to adversely impact performance.

For more information on interchangeability checking, see IVI-3.1: Driver Architecture Specification.

Simulation -- Required

IVI drivers are often constructed for complex instruments that are difficult to procure or that are in high demand at the end user facility. Consequently, it may be the case that end users need to be able to test their application programs without being physically connected to an instrument. IVI driver simulation is a feature that allows end users to use IVI drivers without a physical connection to the instrument.

When an end user enables simulation in an IVI driver, the driver performs no I/O communication whatsoever. IVI drivers are free in their choice of mechanisms for returning meaningful output values to the end user, but the intent is that the user program should be able to proceed normally when calling functions on the driver. This allows the end user to exercise their test application before the actual hardware is available.

For more information on simulation, see IVI-3.1: Driver Architecture Specification.


Two Flavors of IVI -- IVI-COM and IVI-C

[image]

AgM9216 IVI Driver Reference Agilent Technologies
Two Flavors of IVI -- IVI-COM and IVI-C

IVI drivers currently come in two basic types -- IVI-COM and IVI-C. Although the functionality offered by both types of driver is often very similar, the fundamental differences in interface technology results in a very different end-user experience. This topic discusses some of the important differences between IVI-COM and IVI-C drivers.

IVI-COM and IVI-C at a Glance

The table below presents a summary of some of the important differences between IVI-COM and IVI-C drivers. A brief explanation of each point is given later in this topic.

IVI-COM IVI-C
Files Supplied
  • COM DLL (<Driver>.dll).
  • .NET DLL (<Company>.<Driver>.Interop.dll).
  • Windows DLL (<prefix>.dll).
  • Header file (<prefix>.h).
  • Import library (<prefix>.lib).
  • Function panel file (<prefix>.fp).
  • Attribute information file (<prefix>.sub).
ADEs of Choice
  • Visual C#.
  • Visual C++.
  • Visual Basic.NET.
  • LabWindows™/CVI.
.NET Support
  • Use interop assembly as per IVI specs.
  • No manual coding in client program.
  • Interchangeability supported.
  • No standard mechanism.
  • Manual coding in client program.
  • Interchangeability not possible.
Interchangeability
  • Use COM session factory.
  • No 3rd party components.
  • Multiple instrument classes per driver possible.
  • Requires 3rd-party class drivers.
  • Only one instrument class per driver.
Data Types
  • COM data types.
  • Strings and arrays are self-describing.
  • Memory can be allocated by the driver or by the client.
  • VISA data types.
  • Strings and arrays require extra parameters to indicate size.
  • Memory must be allocated by the client program.
Attribute Programming
  • Same as methods (built-in).
  • Attributes can have parameters.
  • Use attribute accessors and C macros.
  • GetAttributeViReal64, etc..
  • Attributes cannot have parameters.

IVI-COM Basics

IVI-COM drivers use Microsoft's standard COM technology to expose the driver's methods and properties. COM is a proven standard for building reusable, cross-language components on Windows. IVI-COM methods and properties are organized into interfaces that together form a hierarchy of driver functionality. IVI-COM drivers use standardized COM data types that can be understood in a wide variety of ADEs (application development environments).

IVI-COM Type Libraries

IVI-COM drivers are packaged as DLLs, like conventional Windows components. However, unlike conventional Windows components, IVI-COM DLLs contain description information about the functionality of the driver. This information is called the type library and offers such details as the name and signature of all driver functions, version information, parameter input/output direction, and even help information. Since the type library information is baked into the DLL, IVI-COM drivers are fully self-describing. This makes them easier to use in building programs because the developer only has to reference a single DLL to import the driver into their development environment. This also allows IVI-COM drivers to be used seamlessly in .NET programming languages, as is discussed later in this topic.

IVI-C Basics

IVI-C drivers are provided as conventional Windows DLLs with entry points exposed for each function supported by the driver. In addition to the DLL, IVI-C drivers include a header file (.h) and an import library (.lib). You use an IVI-C driver by including the header file in your program source code and then linking to the .lib file. IVI-C drivers use VISA data types, such as ViInt32, ViReal64, and ViChar.

IVI-C Function Panel and Attribute Files

Since IVI-C drivers rely upon basic Windows DLL technology, there is no way to represent a hierarchy of driver functionality in the DLL itself. Instead, IVI-C drivers use two additional files to present the logical organization of driver functions and attributes. The function panel file (.fp) is a variable-record binary file that presents the function hierarchy only. The attribute hierarchy is managed in a separate file called the attribute information file (.sub). The .sub file is a text file. The function and attribute hierarchies are managed separately because IVI-C development was heavily influenced by VXI Plug-n-Play driver standards, which had already established this bifurcation.

ADE Support for IVI-COM and IVI-C Drivers

Arguably the most important consideration in comparing IVI-COM and IVI-C drivers is the end user experience in various ADEs. Since IVI-COM drivers are based on Microsoft COM technology, it's not surprising that IVI-COM drivers offer the richest user experience in Microsoft ADEs. Users working in Visual C++, Visual C#, Visual Basic.NET and Visual Basic 6 will enjoy a host of features, such as object browsers, IntelliSense, and context-sensitive help.

IVI-COM drivers are also well-supported in environments targeting the test and measurement industry. Agilent® VEE® and MATLAB® provide built-in support for IVI-COM drivers, as does National Instruments® LabVIEW®. As of LabVIEW 8.0, a new feature called the Class Browser appeared, greatly simplifying the use of IVI-COM drivers in LabVIEW.

For more details on using an IVI-COM driver in various ADEs, see the topic Programming with the IVI-COM Driver in Various Development Environments.

The ADE story for IVI-C centers primarily around National Instruments LabWindows/CVI. IVI-C drivers work seamlessly in LabWindows/CVI, with built-in support for rendering the hierarchies and function panels stored in the .fp and .sub files. In all other environments, however, IVI-COM drivers provide a better user experience. LabWindows/CVI is a special case where IVI-COM drivers do not fare well. Users working in LabWindows/CVI will have a fundamental expectation that an IVI-C driver be provided for any instrument they need to use in that environment.

.NET Support and Interop Assemblies

Microsoft provides excellent .NET support for all COM components through .NET wrappers called interop assemblies. These interop assemblies are generated automatically with standard Microsoft tools (such as Visual Studio) and present a familiar .NET interface to a COM component. Since IVI-COM drivers are standard COM components, these interop assemblies can be produced for IVI-COM drivers in precisely the same way as for any other COM component. Programmers working in any .NET environment (C#, VB.NET, C++) can work with the IVI-COM driver as if it were a native .NET component.

The IVI Foundation provides a specification prescribing how this should be done, so that end users have a consistent experience with IVI-COM drivers in .NET. Please see IVI-3.14: Primary Interop Assembly Specification for details on building IVI-COM interop assemblies. More importantly, the IVI Foundation provides the interop assemblies required for achieving .NET interchangeability with IVI-COM drivers. These are installed as part of the IVI Shared Components.

In the "\IVI\Bin\Primary Interop Assemblies" subfolder of your IVI installation directory, you will find the interop assemblies for the IVI instrument classes as well as those for specific instrument drivers. The interop assemblies shipped by the IVI Foundation have names such as Ivi.Dmm.Interop.dll and Ivi.SpecAn.Interop.dll. Correspondingly, all instrument-specific interop assemblies must follow an IVI-specified convention:
<Company>.<Driver>.Interop.dll

Since IVI-C drivers are conventional Windows DLLs, there is no standard mechanism for creating .NET wrappers for IVI-C drivers. Instead, client programmers must add special declarations to their program for any IVI-C driver function they wish to use in their application. These declarations must be adorned with special .NET attributes that instruct the .NET environment on what kind of function is inside the driver. (For details on what's required to call DLL functions in .NET, see the MSDN documentation regarding the "DllImport" attribute and a featured called "P/Invoke".) The critical thing to note is that because there is no standard mechanism for creating .NET wrappers on conventional Windows DLLs, the IVI Foundation cannot supply a standard mechanism for programming against IVI-C drivers in .NET. Thus, interchangeability with IVI-C drivers in .NET is not possible.

Interchangeability

IVI-COM drivers and IVI-C drivers differ fundamentally is how they allow you to write interchangeable programs. With IVI-COM drivers, the developer references a standard, IVI Foundation-supplied DLL that defines the functions and attributes for a particular instrument class. These Foundation-supplied DLLs are referred to as the IVI-COM type libraries, and they are automatically installed as part of the IVI Shared Components. Another shared component called the COM Session Factory is used to instantiate an IVI-COM driver without having a hard-coded reference to the specific driver in use.

The topic Writing Interchangeable Code Using the NoClass Class-Compliant Interfaces provides examples on interchangeable programming with the IVI-COM driver while the topic Writing Interchangeable Code Using the NoClass Class Driver illustrates how to write interchangeable programs using the IVI-C driver.

One important distinction between IVI-COM and IVI-C drivers when considering interchangeability is the number of instrument classes a single driver can support. Some instruments actually have functionality that spans more than one instrument class. For instance, some popular switch measure units offer both IviDmm and IviSwtch functionality, so supporting both sets of IVI-defined interfaces is very useful. With IVI-COM, a single driver such an instrument can be accommodated, as IVI-COM drivers can support any number of instrument classes at once. IVI-C drivers, however, have a fundamental limitation imposed by the attribute model they use. Each attribute in IVI-C is assigned a numeric identifier, but these identifiers are only unique within an instrument class -- not between instrument classes. Because of this, an IVI-C driver would not be able to support attributes from more than one instrument class, and so only a single class can be supported by any IVI-C driver.

Data Types

IVI-COM and IVI-C drivers use two different sets of data types. IVI-COM drivers use a special subset of the COM data type system, called automation data types. Simply put, this type system is designed to allow common access from a wide range of programming languages -- from Visual Basic 6 to C++ to C#. IVI-C drivers, on the other hand, use the VISA data type system, which is based on classic C data types.

The primitive data types, such as integers, floating point numbers, and booleans are represented similarly in both IVI-COM and IVI-C drivers. The key differences are in how arrays and strings are handled. IVI-COM drivers use the SAFEARRAY data type to represent arrays and the BSTR data type to represent strings. These data types are self describing in that the SAFEARRAY contains the number of elements in the array and the BSTR contains the length of the string. This means that when passing array parameters into or out of an IVI-COM driver, no extra parameters are required to describe the array. IVI-C drivers, on the other hand, need to pass extra "size" parameters to any IVI-C function that uses an array or string. (It is also a useful note that BSTR strings are allowed to contain embedded NULL characters, whereas IVI-C ViString parameters must always be NULL-terminated.)

In the IVI-COM example below, a client program is calling an IVI-COM driver function to fetch an array of measurements from the instrument. Note how only the array parameter need be returned from the function, as the size of the array is embedded in the SAFEARRAY data type.

C++ Copy image Copy Code
double[] data;
scope.Measurement.FetchWaveform(ref data);

In the IVI-C example below, a client program is calling an IVI-C driver function to read from the instrument. In constrast to the previous IVI-COM example, the IVI-C programmer must pass in two extra parameters to describe the array -- one for the client to tell the driver the size of the input array, and one for the driver to tell the client how many array elements were returned.

C++ Copy image Copy Code
ViSession vi;
/* session initialization omitted for clarity */

ViReal64 waveform[1000];
ViInt32 waveformSize = 1000;
ViInt32 actualSize;
ViStatus status = IviScope_FetchWaveform(vi, VI_NULL, waveformSize, waveform, &actualSize);

Memory Allocation

IVI-COM and IVI-C drivers use opposite rules for memory allocation. This is important when dealing with string and array parameters. In IVI-COM, the driver typically allocates the memory associated with an output parameter, such as an array of measurement data. This is convenient for the end user because they do not need to know how much memory to allocate ahead of time. The driver simply allocates the memory required to return the output data. In some situations, such as when dealing with very large data sets, it may be desirable for the client program to pre-allocate memory and pass it to the driver. This allows memory to be reused across multiple calls to the driver. To support this use case, IVI-COM drivers allow pre-allocated memory to be passed in as well.

When using IVI-C drivers, the calling program must always allocate the memory for an output parameter. This requires the caller to know how much memory to allocate ahead of time and to pass in an extra parameter to the driver indicating the amount of memory that was allocated. This prevents the driver from writing too much data into the output parameter. The driver must then return an additional output parameter that indicates how much data was actually copied into the output buffer. It's up to the client program to determine whether or not all of the data has been retrieved.

Programming with Attributes

In both IVI-COM and IVI-C, drivers use functions and attributes to control the instrument. In both models, functions typically represent operations, such as taking a measurement, while attributes typically represent instrument settings, such as range or resolution. However, IVI-COM and IVI-C drivers have a very different model for programming attributes.

The IVI-COM model for programming attributes is straightforward. The functions and attributes are part of the same hierarchy. The user accesses an attribute using a simple assignment statement, as in the following:

C++ Copy image Copy Code
// Set the sample rate to 1000
scope.Acquisition.SampleRate = 1000;

Conventional Windows DLLs have no built-in notion of attributes, so IVI-C drivers rely upon a special idiom where dedicated "getter" and "setter" functions are used along with C macro identifiers. Every IVI-C driver supports the following standard set of attribute accessors, organized based on the data type of the attribute:

  • GetAttributeViInt32, SetAttributeViInt32
  • GetAttributeViInt64, SetAttributeViInt64
  • GetAttributeViReal64, SetAttributeViReal64
  • GetAttributeViString, SetAttributeViString
  • GetAttributeViBoolean, SetAttributeViBoolean
  • GetAttributeViSession, SetAttributeViSession

Each IVI-C attribute has an associated #define'd constant in the driver header file, and this constant is passed to the appropriate getter or setter function to read or write the attribute, as in the following example:

C++ Copy image Copy Code
ViSession vi;
/* session initialization omitted for clarity */

/* Set the sample rate to 1000 */
ViStatus status = IviScope_SetAttributeViReal64(vi, VI_NULL, IVISCOPE_ATTR_HORZ_SAMPLE_RATE, 1000);

A couple of things are noteworthy about the IVI-C attribute model. First, the programmer must take care to use the correct type of attribute setter or getter for the attribute in question. In the above example, the IVISCOPE_ATTR_HORZ_SAMPLE_RATE attribute is a double-precision floating-point value, and the end user must know this when programming with the driver. There is no way for the compiler to catch any error, such as using SetAttributeViInt32 with a boolean type attribute.

The other thing to note about the IVI-C attribute model is that since the setter and getter function signatures are fixed for all attributes, there is no way to have parameterized attributes. In contrast, IVI-COM drivers support attributes with parameters.


How IVI Drivers Provide Interchangeability

[image]

AgM9216 IVI Driver Reference Agilent Technologies
How IVI Drivers Provide Interchangeability

What is an IVI Instrument Class?

The IVI Foundation uses the term instrument class to refer to a distinct set of functionality for a canonical instrument type. Although there are many different types of instruments used in test and measurement and their functionality varies considerably, many of these instruments naturally fall into distinct categories, or types. Often these instruments are categorized based upon the type of measurements they can perform or the type of output they can produce.

For each instrument class, the IVI Foundation publishes a specification, known as the class specification. Each class specification lays out the requirements for compliance with that class specification. An IVI driver that complies with a class specification is said to be a class-compliant IVI driver. The primary purpose of an IVI class specification is to detail the set of functions and attributes that an IVI driver must support in order to be class-compliant. The class specification carefully prescribes the exact name of each function, along with the parameter list and the API hierarchy, as well as other behavior details.

Currently, the IVI Foundation has defined and approved specifications for twelve instrument classes. These specifications are available from the IVI Foundation.

  • IVI-4.1: IviScope Class Specification
  • IVI-4.2: IviDmm Class Specification
  • IVI-4.3: IviFgen Class Specification
  • IVI-4.4: IviDCPwr Class Specification
  • IVI-4.5: IviACPwr Class Specification
  • IVI-4.6: IviSwtch Class Specification
  • IVI-4.7: IviPwrMeter Class Specification
  • IVI-4.8: IviSpecAn Class Specification
  • IVI-4.10: IviRFSigGen Class Specification
  • IVI-4.12: IviCounter Class Specification
  • IVI-4.13: IviDownconverter Class Specification
  • IVI-4.14: IviUpconverter Class Specification
  • IVI-4.15: IviDigitizer Class Specification

Interchangeability and IVI

The term interchangeability in IVI refers to the ability to exchange an instrument of one class in a system with a different instrument from that same class. IVI interchangeability does not generally refer to the case of exchanging instruments from different instrument classes.

Client applications achieve interchangeability by writing their code such that it meets at least the following two conditions:

  1. It uses only functions and attributes from the IVI class specification.
  2. It has no references to a specific IVI instrument driver.

Since IVI drivers can contain functionality beyond the class specification (known as instrument-specific functionality), the client programmer must take care to only use functionality from the IVI specification if their program is to be interchangeable. Only the IVI-defined functionality is guaranteed to be supported by a class-compliant driver.

The second condition (excluding references to a specific driver) is a bit trickier to meet, and requires the use of extra software components. The mechanism by which this is achieved is different for IVI-COM drivers and IVI-C drivers.

IVI-COM Interchangeability

Interchangeability with IVI-COM relies upon special components shipped as part of the IVI Shared Components. The first component required for IVI-COM interchangeability is the COM Session Factory. This component allows users to instantiate a specific IVI-COM driver by name, rather than by a hard-coded program reference.

The name used to instantiate the driver is termed the logical name. The IVI Configuration Store holds all of the user-assigned logical names, and maps them to specific IVI drivers. When a different instrument is introduced into the system, the user need only change the specific driver referenced by their logical name in the IVI Configuration Store. No user code is modified, so the application will run without re-compiling or re-linking. The COM Session Factory will lookup the logical name in the IVI Configuration Store and instantiate the new driver.

The second component required for IVI-COM interchangeability is the type library associated with the IVI instrument class in use. The IVI-COM type libraries are also part of the IVI Shared Components. These DLLs contain the interface definitions (function signatures, property and parameter types, etc.) for a particular instrument class. Class-compliant IVI-COM drivers reference these type libraries to implement the functionality they define. Client applications reference these type libraries to access driver functionality in a driver-independent fashion.

The COM Session Factory and the IVI-COM type libraries are the basic machinery that enables interchangeability with IVI-COM drivers.

IVI-C Interchangeability

IVI-C interchangeability differs fundamentally from IVI-COM interchangeability in that IVI-C drivers require the use of a special 3rd-party component called a class driver.

Note:

It is crucial to understand that IVI-C class drivers are not shipped as part of the IVI Shared Components. Rather, class drivers must be obtained from a 3rd party vendor. Furthermore, IVI-C interchangeability does not extend to interchanging class drivers. Specifically, a client application built using class drivers from Vendor A must be modified, re-compiled, and re-linked if it is to use class drivers from Vendor B.

The class driver exposes the functions defined in a particular IVI instrument class. All of the class driver functions have generic names, so that client applications have no driver-specific references. For example, rather than naming a function "ag34401_Configure", which is obviously device-specific, the class driver will expose the function with the name "IviDmm_Configure".

IVI-C client applications link to the class driver and call into the class driver's Initialize function providing a logical name. This logical name is the same as that described for IVI-COM drivers above. Specifically, the logical name identifies a specific IVI-C driver that the class driver should load. Once the specific driver is loaded, subsequent function calls on the class driver are delegated to the corresponding function in the specific driver. In this way, IVI-C client applications can be written generically against a class driver and incorporate new specific drivers without modification.

Base Capabilities and Extension Groups

Each IVI class specification partitions IVI-defined functionality into two groups -- base capabilities and extension groups.

Base Capabilities Group

The Base Capabilities group contains functionality that all IVI drivers must implement if they wish to claim conformance with the instrument class in question. Typically, the Base Capabilities group represents the "least common denominator" of functionality for an instrument class, so most commercial instruments can be expected to support this level of capability.

As an example, the IviDmm Base Capabilities group contains functions for range, resolution, and triggering. Most commercial DMMs possess at least these capabilities, so any IVI driver that wishes to claim IviDmm-compliance must support this group of functionality.

Extension Groups

IVI uses Extension Groups to define functionality that is found in many instruments of a particular class but may not be as common as the functionality expressed in the Base Capabilities. One may think of Extension Groups as being standard definitions for "optional" functionality in an IVI driver.

Extension Groups provide a means for more advanced instruments to expose functionality in an interchangeable fashion, while still allowing simpler instruments to be class-compliant. For instance, not all DMMs have the ability to perform temperature measurements. Thus, the IviDmm class specification uses the IviDmmTemperature Extension Group to define temperature measurement capabilities.

Simply put, an Extension Group is making the statement to the driver developer, "You do not have to provide these capabilities in your IVI driver, but if you do, you must do it according to the IVI definition." An IVI driver can be class-compliant without supporting any of the extension groups in its instrument class. All IVI drivers expose a GroupCapabilities attribute that returns a comma-separated list of the extension groups supported by the driver. Using this attribute, client applications and tools can programmatically determine what optional functionality is present in an IVI driver.


Instrument-Specific Capabilities

[image]

AgM9216 IVI Driver Reference Agilent Technologies
Instrument-Specific Capabilities

Modern instruments typically possess much more functionality than is represented in the IVI instrument class specifications. End users must have a way to access the full capability of the instrument they have purchased. Thus, the driver must expose interfaces that are specific to that instrument alone. These are known as instrument-specific capabilities.

Instrument-specific capabilities are obviously not interchangeable. End users programming against a driver's instrument-specific interfaces typically do so to access functionality that is not available in the class-compliant interfaces . Nevertheless, for complex instruments such as spectrum analyzers, there will often be far more functionality in the IVI driver's instrument-specific hierarchy than in the class-compliant hierarchy.

Although, by definition, IVI does not dictate the syntax and semantics of instrument-specific interfaces, there are still guidelines that must be followed in the design of the interfaces if the driver is to be IVI compliant. Most of these rules are laid out in IVI-3.4: API Style Guide.


IVI Shared Components

[image]

AgM9216 IVI Driver Reference Agilent Technologies
IVI Shared Components

In order to facilitate IVI driver development and to ensure a consistent experience for end users building IVI-based test systems, the IVI Foundation develops and maintains a series of freely available software components. These components are collectively referred to as the IVI Shared Components, and they must be installed on any computer that will use IVI drivers. In fact, IVI driver installation programs are required to check for the presence of the IVI Shared Components before installing.

The following sections provide a brief overview of some of the most important IVI Shared Components.

IVI Shared Component Installer

The IVI Foundation provides an installer for the IVI Shared Components. Moreover, the Foundation's Shared Component installer is the only IVI-compliant way to install the IVI Shared Components. Third parties are not allowed to develop custom installation programs for the IVI Shared Components.

The IVI Shared Component installer creates a directory structure to house the IVI Shared Components as well as IVI drivers themselves. The root of this directory structure is referred to as the IVI install directory (<IviInstallDir>) and is typically <ProgramFilesDir>\IVI Foundation\IVI.

The IVI Shared Component installer is available for download from the IVI Foundation web site.

IVI Configuration Store

When the IVI Shared Components are installed, a special XML file named IviConfigurationStore.xml is placed in the <IviInstallDir>\Data directory. This file is known as the IVI Configuration Store and serves as a central repository for IVI driver configuration information.

IVI driver installers are required to populate the Configuration Store with information such as the instrument classes supported, the instrument models for which the driver is designed, and the physical channel names understood by the driver. End users add information to the Configuration Store to describe how they intend to use IVI drivers in their system. End users can specify logical names for IVI drivers and virtual names for channels.

For more information on the structure of the IVI Configuration Store, see IVI-3.5: Configuration Server Specification available on the IVI Foundation web site.

IVI Configuration Server

The IVI Foundation discourages users and driver developers from directly manipulating the Configuration Store XML file (IviConfigurationStore.xml). The Configuration Store is highly self-referential and easily corrupted if modified directly. Thus, the Foundation provides a COM component known as the IVI Configuration Server for programmatically reading and writing information to the Configuration Store.

The IVI Configuration Server is installed automatically by the IVI Shared Component installer. For more information on how to use the IVI Configuration Server, see IVI-3.5: Configuration Server Specification available on the IVI Foundation web site.

COM Session Factory

IVI-COM drivers, like all COM components, must be created using a specific, hard-coded reference to the main COM class. In Visual Basic, this reference takes the form of a class data type, while in Visual C++, a CLSID must be specified. Irrespective of the IDE in use, this identifier must somehow be provided to instantiate the driver and begin calling methods and properties. Yet, having a direct reference to such an instrument-specific item in an application program renders that application non-interchangeable. Specifically, if the user wishes to use a different instrument (and, hence, a different driver), then this CLSID (or class name in Visual Basic) must be manually changed and the program re-complied and re-linked.

The COM Session Factory (or, simply, the session factory)is a very simple COM component supplied with the IVI Shared Components. In spite of its simplicity, the session factory is a key to writing interchangeable applications that use IVI-COM drivers.

Rather than directly creating an IVI-COM driver using a CLSID (or the equivalent), the application program creates an instance of the session factory and then asks it to instantiate a specific IVI-COM driver. For this to work, the user must create a Logical Name in the IVI Configuration Store and associate that Logical Name with the specific IVI-COM driver they wish to instantiate. The COM Session Factory simply looks up the Logical Name in the IVI Configuration Store, locates the associated IVI-COM driver and instantiates it accordingly.

Note that, as the name implies, the COM Session Factory is only relevant for IVI-COM drivers. IVI-C drivers use a completely different mechanism (namely, IVI Class Drivers), to facilitate interchangeability.

The COM Session Factory is installed automatically by the IVI Shared Component installer. For more information on how to use the IVI Session Factory, see IVI-3.6: COM Session Factory Specification available on the IVI Foundation web site.

IVI-COM Type Libraries

Part of the IVI Shared Components include a series of COM type libraries that contain the interface definitions for the IVI inherent capabilities as well as for all IVI instrument classes. These type libraries are installed in <IviInstallDir>\Bin and are generally named <IviClass>TypeLib.dll. For instance, the type library containing the interface definitions for the IviDmm instrument class is IviDmmTypeLib.dll.

Client applications must directly reference the IVI-COM type libraries from their projects in order to call methods and properties in IVI-defined interfaces. All client applications must include a reference to IviDriverTypeLib.dll, since this type library houses the interface definitions for the IVI inherent capabilities. Application programs must also reference the type library containing the interface definitions for any class-compliant interfaces they wish to support.


Repeated Capabilities

[image]

AgM9216 IVI Driver Reference Agilent Technologies
Repeated Capabilities

Instruments often contain multiple instances of the same kind of functionality or capability. For instance, modern oscilloscopes may have multiple channels, each with independent settings for such things as vertical scale and input attenuation. IVI refers to functionality that is duplicated in an instrument as a repeated capability.

Physical Repeated Capability Names

Instances of repeated capabilities are identified by name. These names are passed as parameters to standard repeated capability accessor functions in order to change settings and execute methods on a driver's repeated capabilities. There are two types of repeated capability names -- physical names and virtual names. Physical repeated capability names are those that the driver writer specifies during driver development. These are the names that the driver natively understands and, as such, they cannot be modified by an end user. They can only be read by an end user. Virtual repeated capability names are explained below.

The physical repeated capability names (or simply physical names) understood by a particular driver can be discovered interactively or programmatically. Each IVI driver is required to register the set of physical names it understands with the IVI Configuration Store. This means an end user can use whatever IVI Configuration Store browser they have to look up the physical names supported by the driver.

Physical names can also be discovered programmatically using standard repeated capability functions. Example code for doing this is given below in the section on Parameter-Style Repeated Capabilities.

Virtual Repeated Capability Names

Virtual names allow end users to specify their own names for repeated capability instances and map those names to the physical names that the driver natively understands. The user establishes the virtual-to-physical name mappings in the IVI Configuration Store. At runtime, the user can supply a virtual channel name to the appropriate function the driver will use the mappings in the IVI Configuration Store to translate the virtual name into a physical name that the driver understands.

The purpose of virtual names is to facilitate driver interchangeability. If a user writes application code using virtual names, then no modifications to the application code are necessary when an existing driver is replaced with one that natively understands different physical names. The user need only modify the appropriate settings in the IVI Configuration Store to map their virtual names to the new driver's physical names.

Types of Repeated Capabilities

The IVI specifications define three different types of repeated capabilities -- parameter-style repeated capabilities, selector-style repeated capabilities, and collection-style repeated capabilities. Each type of repeated capability is often more appropriate depending upon such factors as how common the repeated capability is in a particular instrument class and whether one repeated capability instance is controlled at a time or multiple instances are commonly controlled at a time. Since IVI instrument classes use all three types of repeated capabilities in various instrument classes, it is important to understand the basics of each type of repeated capability.

Parameter-Style Repeated Capabilities

The simplest type of repeated capability is the parameter style. Parameter-style repeated capabilities are used most commonly in IVI-C drivers, though they can also appear in IVI-COM drivers. As the name implies, parameter-style repeated capabilities are supported by simply adding an extra string parameter to any function that applies to a repeated capability (as opposed to a function that applies to the driver as a whole). The client application passes in either a valid physical or virtual repeated capability name for this parameter to identify the particular repeated capability instance to access.

The code below shows an IVI-C driver client using the ConfigureOperationMode function from the IviFGen class specification:

C++ Copy image Copy Code
ViSession vi;
// ...
IviFgen_ConfigureOperationMode(vi, "Output1", IVIFGEN_VAL_OPERATE_BURST);

In the code above, the second parameter is the repeated capability name. The repeated capability name almost always appears as the second parameter to a function that applies to a repeated capability. The example is setting the operation mode to burst for only the output channel identified by "Output1". The name "Output1" could be a physical name or a virtual name.

Drivers that expose a parameter-style repeated capability always expose a couple of additional functions and attributes that allow you to programmatically determine the number of repeated capabilities instances (e.g. "channels") and the physical names supported (e.g. channel names). The names of these support functions are also standardized, so that they can easily be identified when the name of the capability is know. IVI-COM drivers and IVI-C drivers differ slightly in the repeated capability support functions they expose for parameter-style repeated capabilities.

For IVI-COM drivers, the following are required to be present:

  • <Capability>Count attribute (Ex: "ChannelCount")
  • <Capability>Name attribute (Ex: "ChannelName")

For IVI-C drivers, the following are required to be present:

  • <Capability>Count attribute (Ex: "ChannelCount")
  • Get<Capability>Name attribute (Ex: "GetChannelName")

With either IVI-COM or IVI-C, the use model for these attributes is virtually identical. Specifically, the client code simply reads the value of the Count attribute and then uses this value to iterate through the repeated capability instances. The Name attribute (for IVI-COM) and the GetName function (for IVI-C) both accept a one-based index parameter to identify which repeated capability instance name is desired. The code below shows how to iterate through all of the physical names supported by an IVI-C FGen driver that exposes a "Channel" repeated capability.

C++ Copy image Copy Code
ViSession vi;
ViInt32 i;
ViChar name[1024];
// ...
ViInt32 count;
IviFgen_GetAttributeViInt32(vi, VI_NULL, IVIFGEN_VAL_CHANNEL_COUNT);
for (i = 1; i <= count; i++)
{
  // Note: One-based indexing
  IviFgen_GetChannelName(vi, i, 1024, name);
  printf(name);
}

Selector-Style Repeated Capabilities

Selector-style repeated capabilities use a special selector function to set the "active" repeated capability. Subsequent function calls that apply to a repeated capability are understood to apply to the active instance. The active instance remains active until the client code sets the active instance to another repeated capability name.

Selector-style repeated capabilities can be used in both IVI-COM and IVI-C drivers, and, though less common than the parameter style and collection style (discussed shortly), selector-style repeated capabilities have the advantage of not requiring a repeated capability name to be passed to every function that applies to the repeated capability.

As with parameter-style repeated capabilities, drivers that expose a selector-style repeated capability always expose additional functions for managing the repeated capability instances. Indeed, the selector-style repeated capability uses the same functions and attributes as the parameter style, with the addition of one attribute and one function for setting and getting the active instance.

For IVI-COM drivers, the following are required to be present:

  • <Capability>Count attribute (Ex: "ChannelCount")
  • <Capability>Name attribute (Ex: "ChannelName")
  • Active<Capability> attribute (Ex: "ActiveChannel")
  • SetActive<Capability> function (Ex: "SetActiveChannel")

For IVI-C drivers, the following are required to be present:

  • <Capability>Count attribute (Ex: "ChannelCount")
  • Get<Capability>Name attribute (Ex: "GetChannelName")
  • Active<Capability> attribute (Ex: "ActiveChannel")
  • SetActive<Capability> function (Ex: "SetActiveChannel")

Since the selector-style repeated capability uses the same Count attribute and GetName function as the parameter style, the code required to iterate through the instance names for a selector-style repeated capability is identical to that shown above for the parameter style.

Collection-Style Repeated Capabilities (IVI-COM only)

By far, the most common type of repeated capability for IVI-COM drivers is the collection-style repeated capability. Collection-style repeated capabilities are not supported for IVI-C drivers.

As with the parameter and collection style, collection-style repeated capabilities always expose a Count and Name attribute for iterating through the list of available repeated capability names. Unique to collection-style repeated capabilities is the Item property, which provides access to individual repeated capability instances. The Item property accepts a repeated capability name (physical name or virtual name) and returns an interface pointer to the desired repeated capability instance. All method and property calls on the returned interface pointer implicitly apply to the repeated capability instance chosen with the Item property.

The C# code below demonstrates how to use the Item property to access a channel called "CH1" and enable it.

C# Copy image Copy Code
IIviScope scope = new AcmeScopeClass();
// ... Initialize called
IIviScopeChannel channel = scope.Channels.get_Item("CH1");
channel.Enabled = true;

Note that in C#, the Item property is invoked using the get_Item accessor method. This is required for C# because that language does not support parameterized properties. Thus, any property that accepts one or more parameters must be accessed as if it were a method. The standard way in which such properties appear in C# is with a "get_" prefix (for reads) and a "set_" prefix (for writes).

Note also that declaring the intermediate variable for the IIviScopeChannel interface returned by get_Item is not necessary. Depending upon the client application, it may be more convenient to write the code as follows:

C# Copy image Copy Code
IIviScope scope = new AcmeScopeClass();
// ... Initialize called
scope.Channels.get_Item("CH1").Enabled = true;

Static and Dynamic Repeated Capabilities

Many instruments have a fixed number of repeated capabilities. For instance, a function generator typically has a fixed number of output channels. However, some instruments can have a variable number of repeated capabilities, depending upon end-user configuration. For instance, a switching mainframe might have any of a number of combinations of multiplexer cards installed on a particular end-user system. Thus, the number of channels is not fixed and can only be determined at runtime. Such instruments possess what are termed dynamic repeated capabilities. Conversely, instruments that always have a fixed number of repeated capabilities use the term static repeated capabilities.

A driver that exposes dynamic repeated capabilities cannot register the supported repeated capability names during driver installation. Instead, during the driver Initialize call, the driver typically queries the instrument to determine its exact configuration. The mechanism by which a driver determines the name and number of the supported repeated capabilities is always instrument specific, but the net result is that the end user must use the Count and Name attributes to programmatically determine what repeated capability instances are available. An IVI Configuration Store browser is useless in determining what dynamic repeated capabilities a driver supports. It relies only upon static information in the IVI Configuration Store, so it can only report details on static repeated capabilities.

Finally, it is worth noting that a driver can contain both static and dynamic repeated capabilities.


LXI Fundamentals

[image]

AgM9216 IVI Driver Reference Agilent Technologies
LXI Fundamentals

What is LXI?

The LXI Consortium was formed in 2005 with the goal of using LAN-based communication to control instrumentation. LXI stands for (LAN eXtensions for Instrumentation) and the hope is that high-performance, low cost systems can be built based on standard Ethernet technology, as an alternative to the popular, but more industry-specific GPIB communication interface.

Note:

A full discussion of the LXI specifications and their requirements is far beyond the scope of this document. Only a basic introduction to LXI is given here. Please see the LXI Consortium web site for full details.

The LXI standards mostly prescribe hardware and firmware requirements for building LXI-compliant instruments. These requirements are grouped into three classes of LXI compliance -- Class A, Class B, and Class C. (Note that the use of the term "class" here has no relation to the notion of "class" in IVI instrument classes.) The features of each class are summarized in the following table:

Feature | Class C | Class B | Class A
IVI driver | X | X | X
Programmatic control via LAN | X | X | X
LAN-based discovery | X | X | X
Web-based configuration page | X | X | X
1588 Precision Time Protocol |  | X | X
Event logging |  | X | X
LAN-based triggering |  | X | X
Hardware trigger bus |  |  | X

Features of LXI Devices

As the table in the previous section shows, LXI devices possess a variety of useful features, base on their LXI functional class (A, B, or C). The most fundamental features of LXI are required for all functional classes. First and foremost, an IVI driver (either IVI-COM or IVI-C) must be provided with any instrument claiming LXI compliance. Next, the instrument must provide a configuration web page so that users can simply open a browser, navigate to the LAN address of the instrument, and interact with the device. In addition, all LXI devices must support a standard discovery mechanism so that tools and client applications can determine what devices are connected to the network.

With LXI Class B comes important new requirements. First, Class B devices must support the IEEE 1588 Precision Time Protocol standard. This standard provides a way for multiple devices to synchronize their clocks over standard Ethernet networks. Since LAN-based communication is inherently non-deterministic, some mechanism for reliably synchronizing devices in a system is required. The IEEE 1588 standard (simply referred to as "1588") provides this for LXI devices.

Class B devices also support LAN-based triggering and events. The LXI specification defines how devices format, send and receive special LAN packets used to communicate between devices. All Class B devices support a standard set of eight LAN packets. This forms a sort of virtual LAN-based trigger bus, with each of the standard eight LAN packets (known as "LAN0...LAN7") serving as individual trigger lines. LXI devices can be programmed to trigger a measurement or sweep based on receipt of a LAN packet or they can be told to send a specific LAN packet (an event) when a particular operation has completed or the device enters some other interesting operational state.

Class A devices are the most complex LXI devices. They support all of the functionality defined for Class B but add a hardware trigger bus. This trigger bus can be useful in applications that demand extremely precise timing and ultra-low latency triggering between components.

The IviLxiSync Specification

In 2006, the IVI Foundation and the LXI Consortium joined forces to define a standard API for controlling the triggering and eventing capabilities of LXI devices. The result of this cooperation was the IviLxiSync specification, formally known as IVI-3.15: IviLxiSync Specification. The IviLxiSync specification is not an instrument class specification, because it does not define functionality for a particular type of instrument. Rather, it defines operations common to any LXI-compliant device, whether that device is a DMM, oscilloscope, or spectrum analyzer.

Since the IviLxiSync specification spans devices of all instrument classes, it is common that an IVI driver will support IviLxiSync as well as one or more IVI instrument classes. Some of the operations that a client application can perform through the IviLxiSync interfaces include:

  • Configuring a device to trigger on a specific LAN packet.
  • Configuring a device to send an event upon receipt of a particular event from another LXI device.
  • Using filtering to control from which devices an instrument "sees" incoming LAN triggers.
  • Retrieving event log entries from the device.

Just as with IVI instrument classes, the standard functions and attributes defined in the IviLxiSync specification are compiled into an IVI-COM type library. This type library is shipped as part of the IVI Shared Components. Also, as with IVI instrument classes, users can program interchangeably with LXI devices by referencing the IviLxiSync type library and using only IviLxiSync-defined interfaces in their application.

IviLxiSync Subsystems

The IviLxiSync API is divided into five subsystems. Each subsystem controls different aspects of LXI device operation in a system. Depending upon a device's functional class, it may support only some of these subsystems. Class C devices, for example, need not support any of the functionality defined in the IviLxiSync specification. Also, only Class A devices will typically support arming, triggering, and events using the hardware trigger bus. The following table gives the different IviLxiSync subsystems along with their functionality:

Subsystem | Description
IviLxiSyncArm | Controls when triggers are accepted by the LXI device.
IviLxiSyncTrigger | Controls when the LXI device starts a measurement or other operation.
IviLxiSyncEvent | Controls when the LXI device signals specific conditions to other LXI devices.
IviLxiSyncEventLog | Provides access to the event logging features of an LXI device.
IviLxiSyncTime | Exposes functionality for access to the 1588 timebase of the LXI bus.

IviLxiSync Programming Example

This section presents an example LXI test system with common programming tasks using the IviLxiSync interfaces. The example code is based upon the stimulus/response test system shown in the figure below:

In the system above, an arbitrary waveform generator (arb) is used to stimulate a device under test with waveforms at various frequencies, in order to measure the distortion characteristics of the device across its operating range. The stimulus waveform is up-converted to microwave frequencies using an upconverter module and the receiver uses a downconverter to translate the DUT output signal into a range suitable for processing by the digitizer.

The up and down converters are capable of frequency stepped sweep operations (start Frequency, stop Frequency, step Frequency) and can initiate each step based on a trigger signal. The LXI-defined LAN events will be used for this triggering. At each frequency in the sweep, the digitizer acquires the DUT's output waveform using an internal signal level to trigger the acquisition. At each step in the frequency step sweep, the digitizer will wait for a LAN signal from the upconverter and downconverter modules indicating that their signals have settled.

The first task is to configure the digitizer to output a synchronization signal to trigger the arb. The LXI-defined LAN packet named "LAN1" will be used for this purpose. We want the digitizer to send the LAN1 event to the arb when the digitizer is in the waiting-for-trigger state (also known as "armed"). IviLxiSync defines the "WaitingForTrigger" event name as a standard string to identify precisely this device state. This is referred to as the "source" of the outgoing event, because when it occurs (e.g. when the digitizer enters the waiting-for-trigger state), the digitizer will send an outbound LAN packet ("LAN1" in our example).

C# Copy image Copy Code
// Instantiate drivers for all four devices and retrieve the IIviLxiSync interface from all
IIviLxiSync digitizer = (IIviLxiSync) new AcmeDigitizerClass();
IIviLxiSync arb = (IIviLxiSync) new AcmeArbClass();
IIviLxiSync upconverter = (IIviLxiSync) new AcmeUpconverterClass();
IIviLxiSync downconverter = (IIviLxiSync) new AcmeDownconverterClass();

// Call the Initialize function on all drivers (omitted for clarity)
// ...

// Tell the digitizer to send LAN1 when it arms -- used to trigger the arb
digitizer.Events.get_Item("LAN1").Source = "WaitingForTrigger";
digitizer.Events.get_Item("LAN1").Mode = IviLxiSyncDriveModeEnum.IviLxiSyncDriveModeDriven;

// Configuring the "slope" here refers to the slope of the "WaitingForTrigger" event
// that causes the digitizer to send a LAN1 packet
digitizer.Events.get_Item("LAN1").Slope = IviLxiSyncSourceSlopeEnum.IviLxiSyncSourceSlopeRise;

We next configure the arb to accept a trigger on the rising edge of the LAN1 packet that the digitizer will be sending.

C# Copy image Copy Code
// Tell the arb to trigger on the rising edge of LAN1
arb.Trigger.get_Item("LAN1").Detection = IviLxiSyncTriggerSourceDetectionEnum.IviLxiSyncTriggerSourceDetectionRise;
arb.Trigger.TriggerSource = "LAN1";

Next, we configure the digitizer to send an event on LAN2 on the falling edge of the IviLxiSync-defined "WaitingForArm". As with "WaitingForTrigger", the "WaitingForArm" event name provides a standard way to refer to common events that occur within an LXI device. We use the falling edge of the LAN2 packet to trigger the upconverter and downconverter, which must be configured to accept LAN2 as their trigger source.

C# Copy image Copy Code
// Tell the digitizer to send LAN2 on the falling edge of WaitingForArm
digitizer.Events.get_Item("LAN2").Source = "WaitingForArm";
digitizer.Events.get_Item("LAN2").Mode = IviLxiSyncDriveModeEnum.IviLxiSyncDriveModeDriven;
digitizer.Events.get_Item("LAN2").Slope = IviLxiSyncSourceSlopeEnum.IviLxiSyncSourceSlopeFall;

// Tell the up and downconverters to trigger on the rising edge of LAN2
upconverter.Trigger.get_Item("LAN2").Detection = IviLxiSyncTriggerSourceDetectionEnum.IviLxiSyncTriggerSourceDetectionRise;
upconverter.Trigger.TriggerSource = "LAN2";

downconverter.Trigger.get_Item("LAN2").Detection = IviLxiSyncTriggerSourceDetectionEnum.IviLxiSyncTriggerSourceDetectionRise;
downconverter.Trigger.TriggerSource = "LAN2";

The digitizer needs to begin processing when the output signals from both the upconverter and downconverter have settled to a point suitable for processing. This can be accomplished by configuring the upconverter to send a LAN3 packet when the "Settling" event occurs. Similarly, the downconverter will send a LAN4 packet when its "Settling" event occurs.

C# Copy image Copy Code
// Tell the upconverter to output LAN3 when the "Settling" event occurs
upconverter.Events.get_Item("LAN3").Source = "Settling";
upconverter.Events.get_Item("LAN3").Mode = IviLxiSyncDriveModeEnum.IviLxiSyncDriveModeDriven;
upconverter.Events.get_Item("LAN3").Slope = IviLxiSyncSourceSlopeEnum.IviLxiSyncSourceSlopeNegative;

// Tell the downconverter to output LAN4 when the "Settling" event occurs
downconverter.Events.get_Item("LAN4").Source = "Settling";
downconverter.Events.get_Item("LAN4").Mode = IviLxiSyncDriveModeEnum.IviLxiSyncDriveModeDriven;
downconverter.Events.get_Item("LAN4").Slope = IviLxiSyncSourceSlopeEnum.IviLxiSyncSourceSlopeNegative;

// Tell the digitizer to arm when *both* LAN3 and LAN4 are "High"
digitizer.Arm.Sources.get_Item("LAN3").Enabled = true;
digitizer.Arm.Sources.get_Item("LAN3").Detection = IviLxiSyncArmSourceDetectionEnum.IviLxiSyncArmSourceDetectionHigh;

digitizer.Arm.Sources.get_Item("LAN4").Enabled = true;
digitizer.Arm.Sources.get_Item("LAN4").Detection = IviLxiSyncArmSourceDetectionEnum.IviLxiSyncArmSourceDetectionHigh;

digitizer.Arm.Sources.OrEnabled = false;	// "false" means use AND-summing of all enabled arm sources

With the LAN signals "wired" appropriately, the remaining tasks involve configuring and initiating the actual measurements. This might involve configuring other aspects of the digitizer (acquisition length, etc.) and loading a signal file into the arb. The frequency sweep parameters of the upconverter and downconverter also need to be configured.

C# Copy image Copy Code
// Load signal file into arb and get it ready to go
// ...

// Setup rest of digitizer parameters (acquisition length, SignalLevel trigger, etc.)
// ...

// Start digitizer
digitizer.Arm.ArmCount = 100;  // acquire 100 signal packets
digitizer.Initiate();          // digitizer will now wait until it sees Settled from the up and down converters

// Setup frequencies for up and down converters
// NOTE: Functions used here are *not* part of the IviLxiSync specification.  They are just included
// as examples of sweep configuration functions in drivers.
upconverter.Frequency.Sweep.Start = 2e9;
upconverter.Frequency.Sweep.Stop = 3e9;
upconverter.Frequency.Sweep.Step = 10e6;

downconverter.Frequency.Sweep.Start = 2e9;
downconverter.Frequency.Sweep.Stop = 3e9;
downconverter.Frequency.Sweep.Step = 10e6;

// As soon as both converters settle, the digitizer will trigger the arb and take the first measurement

// Call Fetch function on digitizer to retrieve data
// ...


Table 1.1: Relationship between InputPort and InputConnectorSelection

SingleChannel |  | Multiple channel
InputPort | InputConnectorSelection | InputConnectorSelection | Channel | Bank
1 | 1 | 1 | 1 | 1
9 | 2 | 2
17 | 3 | 3
25 | 4 | 4
2 | 5 | 1 | 2
10 | 6 | 2
18 | 7 | 3
26 | 8 | 4
3 | 9 | 1 | 3 | 2
11 | 10 | 2
19 | 11 | 3
27 | 12 | 4
4 | 13 | 1 | 4
12 | 14 | 2
20 | 15 | 3
28 | 16 | 4
5 | 17 | 1 | 5 | 3
13 | 18 | 2
21 | 19 | 3
29 | 20 | 4
6 | 21 | 1 | 6
14 | 22 | 2
22 | 23 | 3
30 | 24 | 4
7 | 25 | 1 | 7 | 4
15 | 26 | 2
23 | 27 | 3
31 | 28 | 4
8 | 29 | 1 | 8
16 | 30 | 2
24 | 31 | 3
32 | 32 | 4


Installation

[image]

AgM9216 IVI Driver Reference Agilent Technologies
Installation

Updating to a New Driver Version

It is important to note that only a single version of an IVI driver can be installed on a system at once. This rule is dictated by the IVI specifications. To ensure that only a single version of the AgM9216 driver exists on the machine, the AgM9216 installer will automatically uninstall a previous version of the driver. Although you can always explicitly uninstall the driver, this is typically not necessary.

Location of Files

The AgM9216 installer deploys and registers a variety of files on the target computer. The notation <IviInstallDir> is used to denote the directory in which the IVI Shared Components have been installed. By default, this is C:\Program Files\IVI Foundation\IVI. Substitute your install directory if the IVI Shared Components were installed in an alternate location.

File | Description
<IviInstallDir>\Bin\AgM9216.dll | Driver DLL.
<IviInstallDir>\Bin\Primary Interop Assemblies\Agilent.AgM9216.Interop.dll | Interop assembly for using the driver in .NET environments.
<IviInstallDir>\Bin\Primary Interop Assemblies\Agilent.AgM9216.Interop.xml | XML documentation file for providing IntelliSense support in .NET environments.
<IviInstallDir>\Include\AgM9216.h | Driver header file.
<IviInstallDir>\Lib\msc\AgM9216.lib | Microsoft-format import library.
<IviInstallDir>\Drivers\AgM9216\AgM9216.fp | Function panel file.
<IviInstallDir>\Drivers\AgM9216\AgM9216.sub | Attribute information file.
<IviInstallDir>\Drivers\AgM9216\AgM9216.chm | HTML 1.0 format help file.
<IviInstallDir>\Drivers\AgM9216\AgM9216.HxS | HTML 2.0 format help file.

Installation on a System with the .NET Framework

The AgM9216 installer detects if the .NET Framework is installed and, if so, registers the driver's Primary Interop Assembly (PIA) and deploys it in the .NET Global Assembly Cache (GAC).

Note:

If the .NET Framework is installed on the target computer after the AgM9216 installer runs, then the PIA must be registered manually. This must be done from a Visual Studio command prompt (not a regular command prompt). The Visual Studio command prompt can be found from Start -> Programs -> Microsoft Visual Studio 2005 -> Visual Studio Tools -> Visual Studio 2005 Command Prompt.

From the Visual Studio command prompt, perform the following two steps:

  1. Navigate to the PIA (<IviInstallDir>\Bin\Primary Interop Assemblies\AgM9216.dll) and execute the following command: "gacutil -i AgM9216.dll". You can also drag-n-drop the PIA from Windows explorer into the GAC folder (C:\Windows\Assembly).
  2. Execute the following command: "regasm /codebase AgM9216.dll".

IVI Shared Components

Before any IVI driver may be installed on a system, the IVI Shared Components must be properly installed. For an introduction to the IVI Shared Components, see the topic IVI Shared Components.

For additional information on the IVI Shared Components, visit the IVI Foundation web site.

To determine which version of the IVI Shared Components are installed on your system

  1. Navigate to <IviInstallDir>\Bin. Typically this is C:\Program Files\IVI Foundation\IVI\Bin.
  2. Locate the file IviSharedComponentVersion.dll.
  3. Right-click on that file and choose Properties.
  4. In the Properties Window, click the Version tab.
  5. The File version field indicates which version of the IVI Shared Components are installed.

Uninstallation

The only proper way to explicitly remove the driver from the system is to use the uninstallation program. Simply removing the installed files will not properly uninstall the driver.

To uninstall the driver

  1. From the Windows Start menu, choose All Programs and select Control Panel.
  2. Double-click Add or Remove Programs.
  3. Select the driver and click Remove.
Note:

In order to prevent loss of important user configuration information between uninstall/reinstall operations, the uninstallation program does not remove any of the following items from the IVI Configuration Store:

  • Logical Name
  • Driver Session
  • Hardware Asset
The only IVI Configuration Store item that is deleted during an uninstall is the Software Module.
For a discussion of IVI Configuration Store entries, such as the Software Module, see Configuring the Driver.


IVI Compliance Information

[image]

AgM9216 IVI Driver Reference Agilent Technologies
IVI Compliance Information

This page provides IVI-required compliance information for the AgM9216 driver.

Compliance Category

IVI drivers come in a variety of types and configurations. This section provides IVI-required compliance information on the various categories of IVI compliance for the AgM9216 driver.

Compliance Category | Compliance Information
Category Name | IVI-COM/C Custom Specific Instrument Driver
Class Specification Version | No IVI instrument class supported.

Optional Features

This section provides IVI-required information regarding optional IVI driver features supported by the AgM9216 driver.

Feature | Supported
Interchangeability checking | No
State caching | No
Coercion recording | No

Driver Identification

This section provides IVI-required identity information for the AgM9216 driver.

Identification Category | Description
Driver Revision | 1.0
Driver Vendor | Agilent Technologies
Driver Description | IVI Driver for Agilent M9216
Prefix/Component Identifier | AgM9216
Supported Models | M9216A


Configuring the Driver

[image]

AgM9216 IVI Driver Reference Agilent Technologies
Configuring the Driver

The IVI Configuration Store is part of the IVI Shared Components distributed by the IVI Foundation. The IVI Configuration Store serves as a central repository for driver registration information. Physically, the IVI Configuration Store is an XML file installed by the IVI Shared Component Installer in the following directory:
<IviInstallDir>\Data\IviConfigurationStore.xml.
where, <IviInstallDir> is typically C:\Program Files\IVI Foundation\IVI.

The AgM9216 installer populates the IVI Configuration Store (Config Store) with the required entries for using the driver. Specifically, the driver installer adds a Software Module entry to the Config Store to represent the driver DLL itself. No other entries in the Config Store are created by the driver. If you only wish to access the instrument specific functionality of the driver, then no other entries in the Config Store are required.

To use the driver in application programs that will be interchangeable, you must edit the Config Store and add a few specific entries. Instrument vendors and other third parties provide graphical tools for conveniently editing the Config Store.

Note:

Although the IVI Configuration Store is a human readable XML file, the IVI Foundation strongly discourages you from directly editing this file. The Config Store file is highly self-referential and easily corrupted if directly modified. Instead, use one of the available third-party editors. Alternatively, the IVI Shared Components include a programmatic interface to the Config Store, known as the IVI Configuration Server.

Editing the IVI Configuration Store

The driver installer creates only one entry in the Config Store -- the Software Module. This entry is removed by the driver uninstaller. End users should never modify the Software Module entry.

To author test programs that allow for interchangeability, you must create three additional entries in the Config Store:

  • Hardware Asset
  • Driver Session
  • Logical Name

The following sections provide descriptions of each of the Config Store entries mentioned here. Consult the documentation for your Config Store editor for detailed instructions on modifying these items.

Software Module

The Software Module identifies the instrument driver DLL, as well as various pieces of important driver information, such as the physical repeated capability names used for the repeated capabilities, IVI compliance information, as well as a variety of other items.

Hardware Asset

The Hardware Asset identifies a specific piece of instrument hardware. The main purpose of the Hardware Asset is to house the I/O resource descriptor used to communicate with the device.

Driver Session

The Driver Session associates the Software Module with the Hardware Asset. The Driver Session also specifies such things as driver initialization values and mappings between physical repeated capability names and virtual repeated capability names. Virtual names are used by client programs to access repeated capabilities in an interchangeable fashion.

For a discussion of repeated capabilities, physical names, and virtual names, see the Repeated Capabilities topic.

Users create a separate Driver Session for each unique combination of driver software, instrument hardware, and initialization settings. You may have multiple Driver Sessions for the same Software Module, if, for instance, the driver is being used to control several instances of the same instrument at different GPIB addresses.

Logical Name

The Logical Name allows users to associate an arbitrary name with a Driver Session. Since the Driver Session is tied to a particular driver and instrument, a level of indirection is needed to abstract these details in interchangeable client applications. The Logical Name serves as this extra level of abstraction -- a simple string identifier for a Driver Session.

The Logical Name is what client programs must use to build interchangeable systems. Applications create instances of IVI-COM drivers by using the COM Session Factory and specifying the Logical Name. Applications load IVI-C specific drivers by passing a Logical Name to the Initialize function on an IVI-C class driver. In either case, no instrument-specific details exist in the client program. Swapping instruments in such a system involves merely associating the Logical Name in the Config Store with a different Driver Session (i.e. a different driver-instrument combination).


AgM9216 IVI-COM Driver

[image]

AgM9216 IVI Driver Reference Agilent Technologies
AgM9216 IVI-COM Driver

The AgM9216 driver includes a fully compliant IVI-COM driver. The topics in this section detail how to perform specific programming tasks using the IVI-COM interfaces available with the AgM9216 driver.

In This Section

Initializing the IVI-COM Driver

Presents the steps required to properly initialize the IVI-COM driver.

Accessing Instrument-Specific Functionality

Explains how to access the specialized functionality of the AgM9216 driver.

Using Simulation

Provides information on using the simulation capabilities of the driver.

Programming with the IVI-COM Driver in Various Development Environment

Demonstrates how the AgM9216 driver can be used in a various application development environments (ADEs).

Reference

Presents reference documentation for each IVI-COM method and property.


Initializing the IVI-COM Driver

[image]

AgM9216 IVI Driver Reference Agilent Technologies
Initializing the IVI-COM Driver

Initializing the IVI-COM driver proceeds in two steps. First, the IVI-COM driver must be instantiated and then the Initialize function is called. This topic explains these two steps along with the options available for each step.

Instantiating the IVI-COM Driver

There are two ways to instantiate the IVI-COM driver -- direct instantiation using the specific driver name, and using the COM Session Factory. If the client application is to be interchangeable, then the COM Session Factory must be used and the driver must support an IVI instrument class. This driver supports NoClass. This component exposes a CreateDriver function that accepts a logical name for the driver. Instantiating the driver by name keeps the client program from having any dependencies on a specific driver and enables the application to be interchangeable.

If interchangeability is not necessary for a particular client application or the driver does not support an IVI instrument class, then you may instantiate the IVI-COM driver directly. The exact syntax for creating an instance of a COM component varies from language to language. For instance, the CreateInstance function can be used in C++ while the new operator is used in C# and Visual Basic.NET. In any event, the client application will have a direct reference to the specific driver, so the program would not be interchangeable. For many applications, this is perfectly acceptable.

The examples below in the section describing the Initialize function will present both techniques for instantiating an IVI-COM driver.

Calling the Initialize Function

The IVI-defined Initialize function offers a variety of options and parameters that control fundamental aspects of the driver's behavior. It is critical to understand what options are available and how they impact driver operation.

ResourceName

The ResourceName parameter can be a logical name present in the IVI Configuration Store or a physical resource descriptor. If the ResourceName is a logical name, then additional options stored in the IVI Configuration Store will be loaded and processed. This allows client code to reuse driver option settings and to keep the driver code as concise as possible, by removing settings that can be stored in the IVI Configuration Store. It is important to note that any parameters or options passed directly to the Initialize function via the OptionString parameter (discussed below) override any settings found in the IVI Configuration Store.

Interface Physical Resource Descriptor Syntax
GPIB GPIB[board]::primary address[::secondary address][::INSTR]
Example: GPIB0::18::INSTR
ASRL ASRL[board][::INSTR]
Example: ASRL1::INSTR
TCPIP TCPIP[board]::host address[::LAN device name]::INSTR
Example: TCPIP0::127.0.0.1::INSTR
TCPIP TCPIP[board]::host address::port::SOCKET
Example: TCPIP0::127.0.0.1::5025::SOCKET
USB USB[board]::manufacturer ID::model code::serial number[::USB interface number][::INSTR]
Example: USB0::2391::291::SN_001001::INSTR
PXI PXI[bus]::device[::function][::INSTR]
Example: PXI1::5::INSTR
PXI PXI0::CHASSISchassis::SLOTslot[::FUNCfunction][::INSTR]
PXI0::bus-device[.function][::INSTR]

IdQuery

If this is enabled, the driver will query the instrument model and compare it with a list of instrument models that is supported by the driver. If the model is not supported, Initialize will fail with the E_IVI_ID_QUERY_FAILED error code.

Reset

If this is enabled, the driver will perform a reset of the instrument. If the reset fails, Initialize will fail with the E_IVI_RESET_FAILED error code.

OptionString

The OptionString allows the user to pass optional settings to the driver. These settings override any settings that are specified in the IVI Configuration Store. If the IVI Configuration Store is not used (a resource descriptor is passed as the ResourceName instead of a logical name) then any setting that is not specified has a default value as specified by IVI.

Option Name | Description | Default
QueryInstrStatus | Specifies whether the IVI specific driver queries the instrument status at the end of each user operation. Querying the instrument status is very useful for debugging. After validating the program, the user can set this attribute to False to disable status checking and maximize performance. The user specifies this value for the entire IVI driver session. | false
Simulate | Specifies whether or not the IVI specific driver simulates instrument driver I/O operations. If simulation is enabled, the specific driver functions do not perform instrument I/O. For output parameters that represent instrument data, the specific driver functions return simulated values. | false
Cache | Specifies whether or not to cache the value of attributes. When caching is enabled, the IVI specific driver keeps track of the current instrument settings so that it can avoid sending redundant commands to the instrument. | true
InterchangeCheck | Specifies whether the IVI specific driver performs interchangeability checking. If the Interchange Check attribute is enabled, the specific driver maintains a record of each interchangeability warning that it encounters. The user calls the Get Next Interchange Warning function to extract and delete the oldest interchangeability warning from the list. | false
RangeCheck | Specifies whether the IVI specific driver validates attribute values and function parameters. If enabled, the specific driver validates the parameter values that users pass to driver functions. Validating attribute values and function parameters is useful for debugging. After validating the program, the user can set this attribute to False to disable range checking and maximize performance. | true
RecordCoercions | Specifies whether the IVI specific driver keeps a list of the value coercions it makes for ViInt32 and ViReal64 attributes. If the Record Value Coercions attribute is enabled, the specific driver maintains a record of each coercion. The user calls the Get Next Coercion Record function to extract and delete the oldest coercion record from the list. | false
DriverSetup | Specifies additional settings supported by the driver, but not defined by IVI. | ""

DriverSetup

This is used to specify settings that are supported by the driver but not defined by IVI. If the Options String parameter contains an assignment for the Driver Setup attribute, the Initialize function assumes that everything following 'DriverSetup=' is part of the assignment. The following settings are supported by the AgM9216 driver.

Option Name | Description | Default
Model | Instrument model to use during simulation. Must be one of the supported model strings as returned by the IviDriver.Identity.SupportedInstrumentModels property. | (default_model)
Trace | If true, output trace log of all driver calls to an XML file in the same directory as the application executable accessing the driver or as specified by the TraceName option. The log file may be viewed in your web browser. Beginning with Agilent IO Libraries Suite 16.0, driver trace messages may also be viewed with the IO Monitor utility. See IO Monitor help for details. | false
TraceName | If specified, sets the path and file name for the XML log file output when option Trace=true. It is not necessary to include the .xml extension with the name. Example: 'DriverSetup = Trace=true, TraceName=C:\Temp\TraceOut' If not specified, tracing generates a unique XML trace file name based on the date and time. A new file is created each time the driver is initialized with tracing enabled. | ""
TraceArray | If true, array parameter data is output to the trace log. | false
TraceArraySizeMax | Specifies the maximum number of elements to trace for array parameters. Requires option 'TraceArray=true'. | 10
TraceSizeMax | Specifies the maximum size of the trace log file in bytes. Once the file reaches this size, tracing will be turned off automatically by the driver. | 1000000
TraceSaveInterval | Specifies how often the driver should save trace data to the trace log file. The value is specified in minutes. | 1

Example 1 (no range checking, no state caching) -- Instantiate with the COM Session Factory

Note: This example only applies to drivers that support an IVI instrument class. This driver supports: NoClass

The following code initializes the driver with default options, except for range checking and state caching which are turned off.

C++ Copy image Copy Code
#import "IviDriverTypeLib.dll" no_namespace
#import "IviSessionFactory.dll" no_namespace

void main()
{
  try
  {
    // Create an instance of the driver using the session factory.
    // This code is interchangeable since no reference to the specific driver exists.
    IIviSessionFactory spFactory(__uuidof(IviSessionFactory));
    IIviDriverPtr spDriver = spFactory->CreateDriver(_T("MyLogicalName"));

    // Initialize the driver with no range checking and no state caching
    // This will also check the instrument ID to make sure it is supported
    // and reset the instrument
    spDriver->Initialize(_T("MyLogicalName"), VARIANT_TRUE, VARIANT_TRUE, _T("RangeCheck=false, Cache=false"));

    // Use the driver...

    // Close the session
    spDriver->Close();
  }
  catch (_com_error&)
  {
  }
}
C# Copy image Copy Code
using System;
using System.Runtime.InteropServices;
using Ivi.Driver.Interop;
using Ivi.SessionFactory.Interop;

public class App
{
  public static void Main(string[] args)
  {
    try
    {
      // Create an instance of the driver using the session factory
      // This code is interchangeable since no reference to the specific driver exists.
      IIviSessionFactory factory = new IviSessionFactoryClass();
      IIviDriver driver = (IIviDriver)factory.CreateDriver("MyLogicalName");

      // Initialize the driver with no range checking and no state caching
      // This will also check the instrument ID to make sure it is supported
      // and reset the instrument
      driver.Initialize("MyLogicalName", true, true, "RangeCheck=false, Cache=false");

      // Use the driver...

      // Close the session
      driver.Close();
    }
    catch (Exception e)
    {
      Console.WriteLine(e.Message);
    }
  }
}

Example 2 (simulation) -- Direct Driver Instantiation

The following code initializes the driver in simulation mode and specifies the model to simulate.

C++ Copy image Copy Code
#import "IviDriverTypeLib.dll" no_namespace
#import "IviSessionFactory.dll" no_namespace
#import "AgM9216.dll" no_namespace

void main()
{
  try
  {
    // Instantiate the driver class directly
    IIviDriverPtr spDriver(__uuidof(AgM9216)); // not interchangeable, using driver class name

    // Initialize the driver with no range checking and no state caching
    // This will also check the instrument ID to make sure it is supported
    // and reset the instrument
    spDriver->Initialize(_T("PXI54::14::0::INSTR"), VARIANT_TRUE, VARIANT_TRUE, _T("Simulate=true, DriverSetup= Model=M9216A"));

    // Use the driver ...

    // Close the session
    spDriver->Close();
  }
  catch (_com_error&)
  {
  }
}
C# Copy image Copy Code
using System;
using System.Runtime.InteropServices;
using Ivi.Driver.Interop;
using Ivi.SessionFactory.Interop;
using Agilent.AgM9216.Interop;

public class App
{
  [STAThread]
  public static void Main(string[] args)
  {
    try
    {
      // Instantiate the driver class directly
      IIviDriver driver = new AgM9216Class(); // not interchangeable, using driver class name

      // Initialize the driver with no range checking and no state caching
      // This will also check the instrument ID to make sure it is supported
      // and reset the instrument
      driver.Initialize("PXI54::14::0::INSTR", true, true, "Simulate=true, DriverSetup= Model=M9216A");

      // Use the class-compliant capabilities...

      // Close the session
      driver.Close();
    }
    catch (Exception e)
    {
      Console.WriteLine(e.Message);
    }
  }
}


Accessing Repeated Capabilities

[image]

AgM9216 IVI Driver Reference Agilent Technologies
Accessing Repeated Capabilities

This page provides information on the supported repeated capabilities and repeated capability names for the AgM9216 driver.

Repeated Capabilities

The AgM9216 driver supports the following repeated capabilities:

  • Channel

The following table provides detailed information on each repeated capability supported by the AgM9216 driver.

For a detailed explanation of repeated capabilities, including repeated capability styles, physical names, and dynamic repeated capabilities, see the topic Repeated Capabilities.

Repeated Capability | IVI-COM Style | Dynamic | Physical Names
Channel | Collection | No | Channel1 Channel2 Channel3 Channel4 Channel5 Channel6 Channel7 Channel8


Accessing Instrument-Specific Functionality

[image]

AgM9216 IVI Driver Reference Agilent Technologies
Accessing Instrument-Specific Functionality

As the name implies, the instrument-specific capabilities are those methods and properties that are unique to the instrument. In practice, the instrument-specific portion of the driver exposes the full functionality of the instrument -- including functionality that may also be available in the class-compliant capabilities. Users that do not care about interchangeability or that need to access functionality that is not defined by IVI will use the instrument-specific interfaces in application programs.

When to use the instrument specific interfaces

  • When the required functionality is not exposed in the class-compliant interfaces.
  • When interchangeability is not a requirement.
  • When performance is critical. Sometimes a driver may perform better using the instrument specific interfaces because they match the instrument functionality more closely than the class-compliant interfaces.

Example

The following client code uses the instrument specific interfaces.

C++ Copy image Copy Code
#import "IviDriverTypeLib.dll" no_namespace
#import "AgM9216.dll" no_namespace

void main()
{
  try
  {
    // Instantiate the driver class directly
    IAgM9216Ptr spDriver(__uuidof(AgM9216));

    // Initialize the driver
    spDriver->Initialize(_T("PXI54::14::0::INSTR"), VARIANT_TRUE, VARIANT_TRUE, _T(""));

    // Use instrument specific interfaces...
    spDriver->Output->Enabled = VARIANT_TRUE;

    // Close the session
    spDriver->Close();
  }
  catch (_com_error&)
  {
  }
}
C# Copy image Copy Code
using System;
using System.Runtime.InteropServices;
using Ivi.Driver.Interop;
using Agilent.AgM9216.Interop;

namespace ClientApp
{
  public class App
  {
    [STAThread]
    public static void Main(string[] args)
    {
      try
      {
        // Instantiate the driver class directly
        IAgM9216 driver = new AgM9216Class();

        // Initialize the driver
        driver.Initialize("PXI54::14::0::INSTR", true, true, "");

        // Use instrument specific interfaces...
        driver.Output.Enabled = true;

        // Close the session
        driver.Close();
      }
      catch (Exception e)
      {
        Console.WriteLine(e.Message);
      }
    }
  }
}


Using Simulation

[image]

AgM9216 IVI Driver Reference Agilent Technologies
Using Simulation

An IVI driver can operate without the presence of an actual instrument by using simulation mode. When simulation is turned on, the driver performs no instrument communication, but attempts to generate results which allow client applications to reasonably execute. You can turn on simulation using either of the following two techniques:

  • Passing the "simulate=true" option string parameter to the Initialize method.
  • Setting the Simulate property to True.

The IVI-COM driver contains a Simulate property in the IIviDriverOperation interface. The IVI-C driver contains a corresponding Simulate attribute. Note that if you initialize an IVI-COM driver with simulation turned off you can later turn the simulation on. However, if you initialize an IVI-COM driver with simulation turned on, you will get an error (The simulation state cannot be changed) if you attempt to later turn it off. This is because you cannot initiate a live I/O session with an instrument after you have called the Initialize function.

Using The Option String

The fourth and last parameter to the Initialize method is the option string. See the help on Initialize for more details. To turn simulation on with the option string, include the following in the option string:

simulate=true

For example, the Initialize call in C# might look like this:

instr.Initialize("PXI54::14::0::INSTR", true, true, "Simulate=True");

When the simulate option is set True, the value of the resource descriptor parameter (the first parameter above) is ignored. This is because no I/O connection will be made with the instrument, as is required by IVI-3.1: Driver Architecture Specification.

The Driver Session Simulate Property

A DriverSession in the IVI Configuration Store contains properties for the same items which can be set with the option string parameter. The name of a DriverSession, or the name of a LogicalName which points to a DriverSession, can be used as the first parameter to Initialize. If the Simulate property in the DriverSession is true, the driver is initialized in simulation mode.

Changing the Instrument Model

Many drivers support more than one instrument model. These models are listed in the SupportedInstrumentModels property in the IIviDriverIdentity interface. Drivers will typically select one of these as the default model by creating a special type of entry in the IVI Configuration Store known as a Configurable Initial Settings. You can modify the Model value in the Configurable Initial Settings for the DriverSession of interest, or you can simply specify the model to simulate at runtime during the call to Initialize.

To have the driver simulate a specific model of your choosing, simply add the desired model to the DriverSetup string using the following special syntax:

Simulate=true, DriverSetup=Model=M9216A

The complete Initialize call becomes:

instr.Initialize("PXI54::14::0::INSTR", True, True, "Simulate=True, DriverSetup= Model=M9216A")

If you set the model to a value not supported by the driver, the driver reports an error.

Limitations of Simulation

Simulation is designed to allow the driver to be used without an instrument or any I/O software or hardware. However, simulation is not intended to fully emulate the instrument. There are some important differences you should be aware of:

  • Many instruments have status systems, and these are not live. For instance, you can set Enable and Transition registers but queries of Condition and Event registers will always return a fixed value, which is usually zero.
  • There often is no parameter range checking or coercion unless done in the driver. Most drivers depend on the instrument to perform range checking and coercion of parameter values. In simulation mode, this will not occur. For example setting a frequency parameter to 1E99 will be accepted without error in simulation where an instrument would return a "parameter out of range" error.
  • IIviDriverUtility::ErrorQuery() typically returns no error.
  • Measurement data is not live. Most data queries will return a fixed value or a small array of values.


Programming with the IVI-COM Driver in Various Development Environments

[image]

AgM9216 IVI Driver Reference Agilent Technologies
Programming with the IVI-COM Driver in Various Development Environments

IVI-COM drivers are implemented using standard COM technology. Specifically, IVI-COM drivers support what are known as custom COM interfaces. To ensure compatibility with the broadest possible set of development environments, the IVI specifications restrict data types that can be used in an IVI-COM driver to a special set called oleautomation data types (also known simply as automation data types. Automation types were originally designed for Visual Basic but have since gained broad acceptance. Consequently, IVI-COM drivers can be used in a wide variety of development environments, namely, those that support custom oleautomation COM interfaces.

IVI-COM Drivers and .NET

Interop assemblies are used in .NET environments, such as C# and VB.NET, to access COM components. When installing an IVI-COM driver on a computer with the .NET Framework, the IVI specifications require an interop assembly be deployed and properly registered. The full path to the interop assembly for the AgM9216 driver is:

<IviInstallDir>\Bin\Primary Interop Assemblies\Agilent.AgM9216.Interop.dll

The topics in this section provide detailed instructions on how to access and use IVI-COM drivers in a variety of popular development environments. Each topic includes a complete example of IVI-COM driver usage.

In This Section

Using C#

Provides instructions on using interop assemblies to access IVI-COM drivers.

Using Visual Basic.NET

Describes the process for importing interop assemblies into Visual Basic.NET and invoking methods and properties.

Using Visual C++

Explains how to import IVI-COM driver type libraries into C++ and use smart pointers to access methods and properties.

Using Visual Basic 6

Explains how to use IVI-COM drivers with pre-.NET Visual Basic.

Using Agilent VEE Pro®

Presents information on using the driver with Agilent VEE Pro.

Using LabVIEW®

Provides an introduction to LabVIEW's special support of IVI-COM.

Using MATLAB®

Presents information on using the driver with MATLAB.


Using Visual C#

[image]

AgM9216 IVI Driver Reference Agilent Technologies
Using Visual C#

This section describes how to use an IVI-COM driver from Visual C#.

Referencing the Driver

In order to access any of the driver interfaces, the proper references to the driver DLL and at least one of the IVI DLLs (specifically, IviDriverTypeLib.dll) must be created.

  1. In solution explorer, right-click on References and select Add Reference.
  2. Click the COM tab.
  3. Select the following type libraries:
    • IviDriver 1.0 Type Library
    • IVI AgM9216 1.0 Type Library
  4. Click the Select button and then OK.
  5. Each of the above type libraries should now appear under the References node in solution explorer.

All data types (interfaces and enums) are contained within namespaces. Usually the namespace-qualified name must be used, but the C# using statement allows the type name to be used directly.

C# Copy image Copy Code
using Ivi.Driver.Interop;
using Agilent.AgM9216.Interop;

Creating an Instance of the Driver

Create a driver instance object of type AgM9216 as shown below.

C# Copy image Copy Code
AgM9216 driver = new AgM9216();

Initializing the Driver

Calling Initialize will establish an I/O connection to an instrument (often referred to as an "I/O session") or setup the driver to work in simulation mode. Calling Close at the end of your program is required, else unpredictable driver behavior could result. Any resources held by the driver will not be properly released if Close is not called.

For more details on the Initialize function, see the topic: Initializing the Driver

Initializing Using a Resource Descriptor

The driver is typically initialized using a resource descriptor, often a VISA resource descriptor, as shown below.

C# Copy image Copy Code
driver.Initialize("PXI54::14::0::INSTR", false, false, "");
driver.Close();

Initializing Using Options

This example shows how IVI-defined initialization options and driver-specific options can be passed to the Initialize function.

C# Copy image Copy Code
// If true, this will query the instrument model and fail initialization
// if the model is not supported by the driver
bool idQuery = false;

// If true, the instrument is reset at initialization
bool reset = false;

// Setup IVI-defined initialization options
string standardInitOptions =
  "Cache=false, InterchangeCheck=false, QueryInstrStatus=true, RangeCheck=false, RecordCoercions=false, Simulate=false";

// Setup driver-specific initialization options
string driverSetupOptions =
  "DriverSetup= Model=M9216A, Trace=false";

driver.Initialize("PXI54::14::0::INSTR", idQuery, reset, standardInitOptions + "," + driverSetupOptions);

// Driver application code here...

driver.Close();

Accessing Methods and Properties

Each set of capabilities (inherent, class-compliant or instrument specific) is defined as a hierarchy of interfaces containing methods and properties. A property can return a pointer to another interface -- this is how the hierarchy is built.

Note: The code below is for illustration only, may be from other drivers, and may not apply directly to this driver.

Simple Data Types

C# Copy image Copy Code
// Set the value of a property
driver.Frequency.VoltageRange = 20.0;

// Get the value of a property
double voltageRange = driver.Frequency.VoltageRange;

// Set the value of a property (enum)
driver.Temperature.TransducerType = IviDmmTransducerTypeEnum.IviDmmTransducerTypeThermocouple;

// Read a value from a method (as a return value)
double measuredValue = driver.Measurement.Read(2000);

Strings

C# Copy image Copy Code
// Get a string property
string description = driver.Identity.Description;

// Read a value from a method (as a return value)
string coercionRecord = driver.DriverOperation.GetNextCoercionRecord();

// Read a value from a method (as an out parameter)
string errMsg = null;
int errCode = 0;
driver.Utility.ErrorQuery(ref errCode, ref errMsg);

Arrays

The example below demonstrates calling a method with an array parameter marked as [out,retval].

C# Copy image Copy Code
// Read an array of values, this returns a typed array
double[] measuredValues = driver.Measurement.ReadMultiPoint(5000);

// Iterate through the array
for (int i = 0; i < measuredValues.Length; i++)
{
  double measuredValue = measuredValues[i];
}

This example demonstrates passing an input array to a driver method. Note the use of the C# ref keyword.

C# Copy image Copy Code
// Here we know in advance the exact size of the array
double[] frequencies = new double[3];
frequencies[0] = 10.0E6;
frequencies[1] = 12.0E6;
frequencies[2] = 14.0E6;

// An array input parameter takes a reference to an array
driver.ConfigureFrequencies(ref frequencies);

// Here we do not know in advance the size of the array
// so we use a resizable array
ArrayList valueList = new ArrayList();
valueList.Add(10.0E6);
valueList.Add(12.0E6);
valueList.Add(14.0E6);

// Create a fixed size array from the resizable array
double[] valueArray = (double[])valueList.ToArray(typeof(double));

// An array input parameter takes a reference to an array
driver.ConfigureFrequencies(ref valueArray);

Accessing Repeated Capabilities

IVI-COM drivers can support three different styles of repeated capabilities. This is discussed in the topic Repeated Capabilities. This section demonstrates repeated capability access for all three types of repeated capabilities.

Note: This driver may not use any or all types of repeated capabilites. The code below is for illustration only, may be from other drivers, and may not apply directly to this driver.

Accessing Collection-Style Repeated Capabilities

The following example demonstrates uses of the Item property to access a particular instance ("Trace1") of a collection-style repeated capability. capability. Note that C# requires a special syntax when using parameterized properties, such as the Item property. Specifically parameterized properties appear in C# as methods with "get_" prepended to the property name.

C# Copy image Copy Code
IIviSpecAnTrace trace = specAn.Traces.get_Item("Trace1");

double[] measuredValues = trace.ReadY(25000);

Accessing Selector-Style Repeated Capabilities

The following example demonstrates how to access an instance named "Marker1" from a selector-style repeated capability:

C# Copy image Copy Code
IIviSpecAnMarker marker = specAn.Marker;

marker.ActiveMarker = "Marker1";
marker.Position = 1.2E9;
marker.Enabled = true;

Accessing Parameter-Style Repeated Capabilities

The following example demonstrates how to access an instance named "Channel1" from a parameter-style repeated capability:

C# Copy image Copy Code
IIviFgenFM fm = fgen.FM;

fm.set_Enabled("Channel1", true);
bool enabled = fm.get_Enabled("Channel1");

Complete Example

The following code demonstrates a simple console application that creates and initializes the driver, reads some properties, checks the instrument for errors, and closes the driver.

Complete, working example programs may be found by clicking the Windows Start Menu shortcut under:
All Programs, Agilent IVI Drivers, AgM9216, Examples

C# Copy image Copy Code
using System.Runtime.InteropServices;
using Ivi.Driver.Interop;
using Agilent.AgM9216.Interop;

namespace ClientApp
{
  public class App
  {
    [STAThread]
    public static void Main(string[] args)
    {
      AgM9216 driver = null;
      try
      {
        // Create driver instance
        driver = new AgM9216();

        // Edit resource and options as needed.  Resource is ignored if option Simulate=true
        string resourceDesc = "PXI54::14::0::INSTR";

        string initOptions = "QueryInstrStatus=true, Simulate=true, DriverSetup= Trace=false";

        bool idquery = true;
        bool reset   = true;

        // Initialize the driver.
        driver.Initialize(resourceDesc, idquery, reset, initOptions);
        Console.WriteLine("Driver Initialized");

        // Print a few IIviDriverIdentity properties
        Console.WriteLine("Identifier:  {0}", driver.Identity.Identifier);
        Console.WriteLine("Revision:    {0}", driver.Identity.Revision);
        Console.WriteLine("Vendor:      {0}", driver.Identity.Vendor);
        Console.WriteLine("Description: {0}", driver.Identity.Description);
        Console.WriteLine("Model:       {0}", driver.Identity.InstrumentModel);
        Console.WriteLine("FirmwareRev: {0}", driver.Identity.InstrumentFirmwareRevision);
        Console.WriteLine("\nSimulate:    {0}\n", driver.DriverOperation.Simulate);

        // TODO: Exercise driver methods and properties

        // Check instrument for errors
        int errorNum = -1;
        string errorMsg = null;
        Console.WriteLine("");
        while (errorNum != 0)
        {
          driver.Utility.ErrorQuery(ref errorNum, ref errorMsg);
          Console.WriteLine("ErrorQuery: {0}, {1}", errorNum, errorMsg);
        }
      }
      catch (Exception ex)
      {
        Console.WriteLine(ex.Message);
      }
      finally
      {
        if (driver != null && driver.Initialized)
        {
          // Close the driver
          driver.Close();
          Console.WriteLine("Driver Closed");
        }
      }

      Console.WriteLine("Done - Press Enter to Exit");
      Console.ReadLine();
    }
  }
}


Using Visual Basic.NET

[image]

AgM9216 IVI Driver Reference Agilent Technologies
Using Visual Basic.NET

This section describes how to use an IVI-COM driver from Visual Basic 6.

Referencing the Driver

In order to access any of the driver interfaces, the proper references to the driver DLL and at least one of the IVI DLLs (specifically, IviDriverTypeLib.dll) must be created.

  1. In solution explorer, right-click on References and select Add Reference.
  2. Click the COM tab.
  3. Select the following type libraries:
    • IviDriver 1.0 Type Library
    • IVI AgM9216 1.0 Type Library
  4. Click the Select button and then OK.
  5. Each of the above type libraries should now appear under the References node in solution explorer.

All data types (interfaces and enums) are contained within namespaces. Usually the namespace-qualified name must be used, but the VB Imports statement allows the type name to be used directly.

Visual Basic Copy image Copy Code
Imports Ivi.Driver.Interop
Imports Agilent.AgM9216.Interop

Creating an Instance of the Driver

Create a driver instance object of type AgM9216 as shown below.

Visual Basic Copy image Copy Code
Dim driver As new AgM9216

Initializing the Driver

Calling Initialize will establish an I/O connection to an instrument (often referred to as an "I/O session") or setup the driver to work in simulation mode. Calling Close is required by the IVI specifications, else unpredictable driver behavior could result. Any resources held by the driver will not be properly released if Close is not called.

For more details on the Initialize function, see the topic: Initializing the Driver

Initializing Using a Resource Descriptor

The driver is typically initialized using a resource descriptor, often a VISA resource descriptor, as shown below.

Visual Basic Copy image Copy Code
driver.Initialize("PXI54::14::0::INSTR", False, False, "")
driver.Close()

Initializing Using Options

This example shows how IVI-defined initialization options and driver-specific options can be passed to the Initialize function.

Visual Basic Copy image Copy Code
' If True, this will query the instrument model and fail initialization
' if the model is not supported by the driver
Dim idQuery As Boolean = False

' If True, the instrument is reset at initialization
Dim reset As Boolean = False

' Setup IVI-defined initialization options
Dim standardInitOptions As String = _
  "Cache=true, InterchangeCheck=false, QueryInstrStatus=true, RangeCheck=true, RecordCoercions=false, Simulate=false"

' Setup driver-specific initialization options
Dim driverSetupOptions As String = _
  "DriverSetup= Model=M9216A, Trace=false"

driver.Initialize("PXI54::14::0::INSTR", idQuery, reset, standardInitOptions + "," + driverSetupOptions)
driver.Close()

Accessing Methods and Properties

Each set of capabilities (inherent, class-compliant or instrument specific) is defined as a hierarchy of interfaces containing methods and properties. A property can return a pointer to another interface -- this is how the hierarchy is built.

Note: The code below is for illustration only, may be from other drivers, and may not apply directly to this driver.

Simple Data Types

Visual Basic Copy image Copy Code
' Set the value of a property
driver.Frequency.VoltageRange = 20.0

' Get the value of a property
Dim voltageRange As Double = driver.Frequency.VoltageRange

' Set the value of a property (enum)
driver.Temperature.TransducerType = IviDmmTransducerTypeEnum.IviDmmTransducerTypeThermocouple

' Read a value from a method (as a return value)
Dim measuredValue As Double = driver.Measurement.Read(2000)

Strings

Visual Basic Copy image Copy Code
' Get a string property
Dim description As String = driver.Identity.Description

' Read a value from a method (as a return value)
Dim coercionRecord As String = driver.DriverOperation.GetNextCoercionRecord()

' Read a value from a method (as an out parameter)
Dim errMsg As String = ""
Dim errCode As Integer = 0
driver.Utility.ErrorQuery(errCode, errMsg)

Arrays

The example below demonstrates calling a method with an array parameter marked as [out,retval].

Visual Basic Copy image Copy Code
' Read an array of values. This returns a typed array
Dim measuredValues() As Double = driver.Measurement.ReadMultiPoint(5000)

' Iterate through the array
Dim index As Integer
For index = 0 To (measuredValues.Length - 1)
  Dim measuredValue As Double = measuredValues(i)
Next

This example demonstrates passing an input array to a driver method.

Visual Basic Copy image Copy Code
' Here we know in advance the exact size of the array
Dim frequencies(3) As Double
frequencies(0) = 10.0E6
frequencies(1) = 12.0E6
frequencies(2) = 14.0E6

' An array input parameter takes a reference to an array
driver.ConfigureFrequencies(frequencies)

' Here we do not know in advance the size of the array
' so we use a resizable array
Dim valueList As New ArrayList
valueList.Add(10.0E6)
valueList.Add(12.0E6)
valueList.Add(14.0E6)

' Create a fixed size array from the resizable array
Dim valueArray() As Double
valueArray = valueList.ToArray(GetType(Double))

' An array input parameter takes a reference to an array
driver.ConfigureFrequencies(valueArray)

Accessing Repeated Capabilities

IVI-COM drivers can support three different styles of repeated capabilities. This is discussed in the topic Repeated Capabilities. This section demonstrates repeated capability access for all three types of repeated capabilities.

Note: This driver may not use any or all types of repeated capabilites. The code below is for illustration only, may be from other drivers, and may not apply directly to this driver.

Accessing Collection-Style Repeated Capabilities

The following example demonstrates uses of the Item property to access a particular instance ("Trace1") of a collection-style repeated capability. capability.

Visual Basic Copy image Copy Code
Dim trace As IIviSpecAnTrace = specAn.Traces.Item("Trace1")

Dim measuredValues() As Double = spTrace.ReadY(25000)

Accessing Selector-Style Repeated Capabilities

The following example demonstrates how to access an instance named "Marker1" from a selector-style repeated capability:

Visual Basic Copy image Copy Code
Dim marker As IIviSpecAnMarker = specAn.Marker

marker.ActiveMarker = "Marker1"
marker.Position = 1.2E9
marker.Enabled = true

Accessing Parameter-Style Repeated Capabilities

The following example demonstrates how to access an instance named "Channel1" from a parameter-style repeated capability:

Visual Basic Copy image Copy Code
Dim fm As IIviFgenFM = fgen.FM

fm.Enabled("Channel1") = true
Dim enabled As Boolean = fm.Enabled("Channel1")

Complete Example

The following code demonstrates a simple console application that creates and initializes the driver, reads some properties, checks the instrument for errors, and closes the driver.

Complete, working example programs may be found by clicking the Windows Start Menu shortcut under:
All Programs, Agilent IVI Drivers, AgM9216, Examples

Visual Basic Copy image Copy Code
Imports System
Imports System.Runtime.InteropServices
Imports Ivi.Driver.Interop
Imports Agilent.AgM9216.Interop

Module ClientApp

  Sub Main()

    Try

      ' Create an instance of the driver
      Dim driver As New AgM9216

      ' IIviDriverIdentity properties - Initialize not required
      Dim identifier As String = driver.Identity.Identifier
      Console.WriteLine("Identifier: {0}", identifier)

      Dim revision As String = driver.Identity.Revision
      Console.WriteLine("Revision: {0}", revision)

      Dim vendor As String = driver.Identity.Vendor
      Console.WriteLine("Vendor: {0}", vendor)

      ' Setup Resource Descriptor
      Dim resourceDesc As String = "GPIB0::INSTR"

      ' Setup IVI-defined initialization options
      Dim standardInitOptions As String = _
        "Cache=false, InterchangeCheck=false, QueryInstrStatus=true, RangeCheck=false, RecordCoercions=false, Simulate=false"

      ' Setup driver-specific initialization options
      Dim driverSetupOptions As String = _
        "DriverSetup= Model=M9216A, Trace=false"

      driver.Initialize(resourceDesc, False, False, standardInitOptions + "," + driverSetupOptions)

      Try

        ' IIviDriverIdentity properties - Initialize required
        Dim instModel As String = driver.Identity.InstrumentModel
        Console.WriteLine("InstrumentModel: {0}", instModel)

        Dim instFirmwareRevision As String = driver.Identity.InstrumentFirmwareRevision
        Console.WriteLine("InstrumentFirmwareRevision: {0}", instFirmwareRevision)

        Dim instManufacturer As String = driver.Identity.InstrumentManufacturer
        Console.WriteLine("InstrumentManufacturer: {0}", instManufacturer)

        ' TODO: Exercise driver methods and properties

        ' Check instrument for errors
        Dim errorNum As Integer = -1
        Dim errorMsg As String = ""
        Console.WriteLine("")
        While (errorNum <> 0)

          driver.Utility.ErrorQuery(errorNum, errorMsg)
          Console.WriteLine("ErrorQuery: {0}, {1}", errorNum, errorMsg)

        End While

        Catch ex As COMException

          If ex.ErrorCode = IviDriver_ErrorCodes.E_IVI_INSTRUMENT_STATUS Then

            ' ErrorQuery should give us more information
            int errCode = 0;
            string errMsg = "";
            driver.Utility.ErrorQuery(errCode, errMsg)

            ' Print the error
            Console.WriteLine("Instrument Error: {0}, {1}", errCode, errMsg)

          Else

            ' Print the exception
            Console.WriteLine("Exception: {0}", ex.Message)

          End If

        End Try

        ' Close driver
        driver.Close()

      Catch e As Exception e

        Console.WriteLine(e.Message)

      End Try

      Console.WriteLine("Done - Press Enter to Exit")
      Console.ReadLine()

  End Sub

End Module


Using Visual C++

[image]

AgM9216 IVI Driver Reference Agilent Technologies
Using Visual C++

This section describes how to use an IVI-COM driver from Visual C++. The techniques presented in this section work for Visual Studio 6 and later.

Smart Pointer Wrapper Classes

There are many ways to use COM objects, such as IVI-COM drivers, from Visual C++. The easiest way is to use the #import statement. This special compiler directive automatically generates smart pointer wrapper classes for every interface in your IVI-COM driver. These wrapper classes greatly simplify the use of IVI-COM drivers in C++.

Smart pointer wrapper classes have the following benefits:

  • They provide a simple syntax for instantiating the driver (e.g. calling CoCreateInstance).
  • They automatically call AddRef and Release when needed.
  • They automatically call QueryInterface when navigating to different interfaces on the driver.
  • Method parameters marked as [out, retval] appear as the method return value type instead of an HRESULT.
  • Properties can be accessed as a property instead of using get_ and put_ accessor functions.
  • Methods and properties throw exceptions rather than requiring explicit checks against an HRESULT return code.
  • String parameters (BSTRs) are transformed into the _bstr_t smart string class, which can be initialized with ANSI or Unicode strings.

The code in this section uses smart pointer wrappers. The #import statement supports a variety of optional parameters to exercise more precise control over the wrapper generation and format. See the MSDN documentation on #import for more details.

Referencing the Driver

In order to access any of the driver interfaces, the proper references to the driver DLL and at least one of the IVI DLLs (specifically, IviDriverTypeLib.dll) must be created. Note that the order of the #import statements shown below is important. Compilation will fail if the order is incorrect, as there are dependencies between the types defined in the various DLLs.

GlobMgr.dll is required by drivers using VISA-COM I/O. Generally, SCPI based instrument drivers use VISA-COM and non-SCPI based modular instrument drivers do not. If required, you may have to add the path to GlobMgr.dll (<Program Files>\IVIFoundation\Visa\VisaCom) to your Visual Studio, Tools, Options, Projects and Solutions, VC++ Directories path for executable files.

C++ Copy image Copy Code
#import "GlobMgr.dll" no_namespace  // VISA-COM I/O funtionality - Not needed for modular instruments
#import "IviDriverTypeLib.dll" no_namespace  // IVI inherent functionality
#import "AgM9216.dll" no_namespace  // Instrument specfic functionality

Creating an Instance of the Driver

Unlike most environments that support COM, C++ does not automatically initialize COM, so this must be done explicitly. If you fail to perform this step, then any attempt to make any COM-based call (such as instantiating the driver) will fail.

C++ Copy image Copy Code
// Initialize COM, do this at the start of the program
HRESULT hr = ::CoInitialize(NULL);

// Uninitialize COM, do this at the end of the program
::CoUninitialize();

To instantiate the driver, pass in the CLSID of the specific driver using the __uuidof C++ keyword, as shown below:

C++ Copy image Copy Code
IAgM9216Ptr spDriver(__uuidof(AgM9216));

Initializing the Driver

Calling Initialize will establish an I/O connection to an instrument (often referred to as an "I/O session") or setup the driver to work in simulation mode. Calling Close at the end of your program is required, else unpredictable driver behavior could result. Simply releasing the driver object (which the wrapper classes automatically do for you) is not sufficient. The reference count of the driver will never reach zero if Close is not called.

For more details on the Initialize function, see the topic: Initializing the Driver

Initializing Using a Resource Descriptor

The driver is typically initialized using a resource descriptor, often a VISA resource descriptor, as shown below.

C++ Copy image Copy Code
spDriver->Initialize(_T("PXI54::14::0::INSTR"), VARIANT_FALSE, VARIANT_FALSE, _T(""));
spDriver->Close();

Initializing Using Options

This example shows how IVI-defined initialization options and driver-specific options can be passed to the Initialize function.

For more details on Initialize, see Initializing the Driver topic.

C++ Copy image Copy Code
// If VARIANT_TRUE, this will query the instrument model and fail initialization
// if the model is not supported by the driver
VARIANT_BOOL idQuery = VARIANT_FALSE;

// If VARIANT_TRUE, the instrument is reset at initialization
VARIANT_BOOL reset = VARIANT_FALSE;

// Setup IVI-defined initialization options
_bstr_t standardInitOptions =
  "Cache=false, InterchangeCheck=false, QueryInstrStatus=true, RangeCheck=false, RecordCoercions=false, Simulate=false";

// Setup driver-specific initialization options
_bstr_t driverSetupOptions =
  "DriverSetup= Model=M9216A, Trace=false";

spDriver->Initialize(_T("PXI54::14::0::INSTR"), idQuery, reset, standardInitOptions + _bstr_t(_T(",")) + driverSetupOptions);
spDriver->Close();

Accessing Methods and Properties

Each set of capabilities (inherent, class-compliant or instrument specific) is defined as a hierarchy of interfaces containing methods and properties. A property can return a pointer to another interface -- this is how the hierarchy is built.

Note: The code below is for illustration only, may be from other drivers, and may not apply directly to this driver.

Simple Data Types

C++ Copy image Copy Code
// Set the value of a property
spDriver->Frequency->VoltageRange = 20.0;

// Get the value of a property
double voltageRange = spDriver->Frequency->VoltageRange;

// Set the value of a property (enum)
spDriver->Temperature->TransducerType = IviDmmTransducerTypeThermocouple;

// Read a value from a method (as a return value)
double measuredValue = spDriver->Measurement->Read(2000);

Strings

It is important to correctly free the memory when reading or writing strings. Here the _bstr_t destructor takes care of freeing the memory when the object goes out of scope.

C++ Copy image Copy Code
// Get a string property
_bstr_t description = spDriver->Identity->Description;

// Read a value from a method (as a return value)
_bstr_t coercionRecord = spDriver->DriverOperation->GetNextCoercionRecord();

// Read a value from a method (as an out parameter)
_bstr_t errMsg;
long errCode;
spDriver->Utility->ErrorQuery(&errCode, errMsg.GetAddress());

Arrays

The example below demonstrates calling a method with an array parameter marked as [out,retval]. This uses the CComSafeArray class to manage the memory automatically.

C++ Copy image Copy Code
#include <atlsafe.h> // for CComSafeArray

// Read an array of values, this returns a raw SAFEARRAY pointer
SAFEARRAY* psaMeasuredValues = spDriver->Measurement->ReadMultiPoint(5000);

// Use the CComSafeArray smart data type, transferring memory ownership to it
// Memory will be freed when the smart data type goes out of scope
CComSafeArray<double> csaMeasuredValues;
csaMeasuredValues.Attach(psaMeasuredValues);

// Iterate through the array
for (long i = 0; i < (long)csaMeasuredValues.GetCount(); i++)
{
  double measuredValue = csaMeasuredValues.GetAt(i);
}

It is important to know that the CComSafeArray constructor and assignment operator make a copy of the SAFEARRAY. For arrays containing many elements, this must be carefully taken into consideration. The Attach and Detach functions do not perform copies and can often be used when one might have unnecessarily used the constructor or assignment operator.

The code below demonstrates some common mistakes made when using SAFEARRAYs and the CComSafeArray class.

C++ Copy image Copy Code
#include <atlsafe.h> // for CComSafeArray

// DO NOT DO THIS, this will LEAK!
CComSafeArray<double> csaMeasuredValues = spDCPwr->Measurement->ReadMultiPoint(5000);

// DO NOT DO THIS, this will LEAK!
CComSafeArray<double> csaMeasuredValues(spDCPwr->Measurement->ReadMultiPoint(5000));

The following code demonstrates how to pass an array to a driver method.

C++ Copy image Copy Code
#include <atlsafe.h> // for CComSafeArray

CComSafeArray<double> csaFrequencies;
csaFrequencies.Add(10.0E6);
csaFrequencies.Add(12.0E6);
csaFrequencies.Add(14.0E6);

// An array input parameter takes a SAFEARRAY**
spDriver->ConfigureFrequencies(csaFrequencies.GetSafeArrayPtr());

Accessing Repeated Capabilities

IVI-COM drivers can support three different styles of repeated capabilities. This is discussed in the topic Repeated Capabilities. This section demonstrates repeated capability access for all three types of repeated capabilities.

Note: This driver may not use any or all types of repeated capabilites. The code below is for illustration only, may be from other drivers, and may not apply directly to this driver.

Accessing Collection-Style Repeated Capabilities

The following example demonstrates uses of the Item property to access a particular instance ("Trace1") of a collection-style repeated capability. capability. Note that C++ requires a special syntax when using parameterized properties, such as the Item property. Specifically, square brackets must be used around the repeated capability physical name.

C++ Copy image Copy Code
IIviSpecAnTracePtr spTrace = spSpecAn->Traces->Item[_T("Trace1")];

SAFEARRAY* psaMeasuredValues = spTrace->ReadY(25000);
CComSafeArray<double> csaMeasuredValues;
csaMeasuredValues.Attach(psaMeasuredValues);

Accessing Selector-Style Repeated Capabilities

The following example demonstrates how to access an instance named "Marker1" from a selector-style repeated capability:

C++ Copy image Copy Code
IIviSpecAnMarkerPtr spMarker = spSpecAn->Marker;

spMarker->ActiveMarker = _T("Marker1");
spMarker->Position = 1.2E9;
spMarker->Enabled = VARIANT_TRUE;

Accessing Parameter-Style Repeated Capabilities

The following example demonstrates how to access an instance named "Channel1" from a parameter-style repeated capability:

C++ Copy image Copy Code
IIviFgenFMPtr spFM = spFgen->FM;

spFM->Enabled[_T("Channel1")] = VARIANT_TRUE;
VARIANT_BOOL enabled = spFM->Enabled[_T("Channel1")];

Complete Example

The following code demonstrates a simple console application that creates and initializes the driver, reads some properties, checks the instrument for errors, and closes the driver.

Complete, working example programs may be found by clicking the Windows Start Menu shortcut under:
All Programs, Agilent IVI Drivers, AgM9216, Examples

C++ Copy image Copy Code
#import "GlobMgr.dll" no_namespace  // VISA-COM I/O funtionality - Not needed for modular instruments
#import "IviDriverTypeLib.dll" no_namespace  // IVI inherent functionality
#import "AgM9216.dll" no_namespace  // Instrument specfic functionality

void main()
{
  HRESULT hr = ::CoInitialize(NULL);

  try
  {
    // Create an instance of the driver.
    IAgM9216Ptr spDriver(__uuidof(AgM9216));

    // Edit resource and options as needed.  Resource is ignored if option Simulate=true
    CString strResourceDesc = "PXI54::14::0::INSTR";

    CString strInitOptions = "QueryInstrStatus=true, Simulate=true, DriverSetup= Model=M9216A, Trace=false";

    VARIANT_BOOL idQuery = VARIANT_TRUE;
    VARIANT_BOOL reset   = VARIANT_TRUE;

    // Initialize the driver.
    spDriver->Initialize(LPCTSTR(strResourceDesc), idQuery, reset, LPCTSTR(strInitOptions));
    printf("Driver Initialized\n");

    try
    {
      // Print a few IIviDriverIdentity properties
      wprintf(L"Identifier:  %s\n", spDriver->Identity->Identifier.GetBSTR());
      wprintf(L"Revision:    %s\n", spDriver->Identity->Revision.GetBSTR());
      wprintf(L"Vendor:      %s\n", spDriver->Identity->Vendor.GetBSTR());
      wprintf(L"Description: %s\n", spDriver->Identity->Description.GetBSTR());
      wprintf(L"Model:       %s\n", spDriver->Identity->InstrumentModel.GetBSTR());
      wprintf(L"FirmwareRev: %s\n", spDriver->Identity->InstrumentFirmwareRevision.GetBSTR());

      // TODO: Exercise driver methods and properties

    }
    catch (_com_error& ex)
    {
      if (ex.Error() == E_IVI_INSTRUMENT_STATUS)
      {
        // ErrorQuery should give us more information
        long errCode;
        _bstr_t errMsg;
        spDriver->Utility->ErrorQuery(&errCode, errMsg.GetAddress());

        // Print the error
        wprintf(L"Instrument Error: %s\n", errMsg.GetBSTR());
      }
      else
      {
        // Print the exception
        wprintf(L"Exception: %s\n", ex.Description.GetBSTR());
      }
    }
    spDriver->Close();
  }
  catch (_com_error& e)
  {
    // There was some problem creating the driver or initializing it
    // There is no need to call Close() and we cannot call ErrorQuery()
    // because the driver is not initialized.
    wprintf(L"Exception: %s\n", e.Description.GetBSTR());
  }

  // Note that by this point all COM objects have been released
  // because all the smart pointers go out of scope at the end of
  // the outermost try block.
  // This is important, no COM calls can be made after CoUninitialize.
  ::CoUninitialize();
}


Using Visual Basic 6

[image]

AgM9216 IVI Driver Reference Agilent Technologies
Using Visual Basic 6

This section describes how to use an IVI-COM driver from Visual Basic 6.

Referencing the Driver

In order to access any of the driver interfaces, the proper references to the driver DLL and at least one of the IVI DLLs (specifically, IviDriverTypeLib.dll) must be created.

  1. In the project menu, select References.
  2. Click the COM tab.
  3. Check the following type libraries:
    • IviDriver 1.0 Type Library
    • IVI AgM9216 1.0 Type Library
  4. Click OK.

Creating an Instance of the Driver

Create a driver instance object of type AgM9216 as shown below.

Visual Basic Copy image Copy Code
Dim driver As new AgM9216

Initializing the Driver

Calling Initialize will establish an I/O connection to an instrument (often referred to as an "I/O session") or setup the driver to work in simulation mode. Calling Close at the end of your program is required, else unpredictable driver behavior could result. Any resources held by the driver will not be properly released if Close is not called.

For more details on the Initialize function, see the topic: Initializing the Driver

Initializing Using a Resource Descriptor

The driver is typically initialized using a resource descriptor, often a VISA resource descriptor, as shown below.

Visual Basic Copy image Copy Code
driver.Initialize "PXI54::14::0::INSTR", False, False, ""
driver.Close()

Initializing Using Options

This example shows how IVI-defined initialization options and driver-specific options can be passed to the Initialize function.

Visual Basic Copy image Copy Code
' If True, this will query the instrument model and fail initialization
' if the model is not supported by the driver
Dim idQuery As Boolean
idQuery = False

' If True, the instrument is reset at initialization
Dim reset As Boolean
reset = False

' Setup IVI-defined initialization options
Dim standardInitOptions As String
standardInitOptions = "Cache=true, InterchangeCheck=false, QueryInstrStatus=true, RangeCheck=true, RecordCoercions=false, Simulate=false"

' Setup driver-specific initialization options
Dim driverSetupOptions As String
driverSetupOptions = "DriverSetup= Model=M9216A, Trace=false"

driver.Initialize "PXI54::14::0::INSTR", idQuery, reset, standardInitOptions & "," & driverSetupOptions
driver.Close

Accessing Methods and Properties

Each set of capabilities (inherent, class-compliant or instrument specific) is defined as a hierarchy of interfaces containing methods and properties. A property can return a pointer to another interface -- this is how the hierarchy is built.

Note: The code below is for illustration only, may be from other drivers, and may not apply directly to this driver.

Simple Data Types

Visual Basic Copy image Copy Code
' Set the value of a property
driver.Outputs.Item("MyOutput").VoltageLevel = 3.5

' Get the value of a property
Dim voltageLevel as Double
voltageLevel = driver.Outputs.Item("MyOutput").VoltageLevel = 3.5

' Set the value of a property (enum)
driver.Outputs.Item("MyOutput").TriggerSource = IviDCPwrTriggerSourceExternal

' Read a value from a method (as a return value)
double measuredValue = driver.Outputs.Item("MyOutput").Measure(IviDCPwrMeasurementTypeVoltage)

Strings

Visual Basic Copy image Copy Code
' Get a string property
Dim description As String
description = driver.Identity.Description

' Read a value from a method (as a return value)
Dim coercionRecord As String
coercionRecord = driver.DriverOperation.GetNextCoercionRecord()

' Read a value from a method (as an out parameter)
Dim errCode As Long
Dim errMsg As String
driver.Utility.ErrorQuery errCode, errMsg

Arrays

The example below demonstrates calling a method with an array parameter marked as [out,retval].

Visual Basic Copy image Copy Code
' Read an array of values. This returns a typed array
Dim measuredValues() As Double
measuredValues = driver.Measurement.ReadMultiPoint(5000)

' Iterate through the array
Dim index As Long
For index = LBound(measuredValues) To UBound(measuredValues)
  Dim measuredValue As Double
  measuredValue = measuredValues(i)
Next

This example demonstrates passing an input array to a driver method.

Visual Basic Copy image Copy Code
' Here we know in advance the exact size of the array
Dim frequencies(3) As Double
frequencies(0) = 10.0E6
frequencies(1) = 12.0E6
frequencies(2) = 14.0E6

' An array input parameter takes a reference to an array
driver.ConfigureFrequencies frequencies

Accessing Repeated Capabilities

IVI-COM drivers can support three different styles of repeated capabilities. This is discussed in the topic Repeated Capabilities. This section demonstrates repeated capability access for all three types of repeated capabilities.

Note: This driver may not use any or all types of repeated capabilites. The code below is for illustration only, may be from other drivers, and may not apply directly to this driver.

Accessing Collection-Style Repeated Capabilities

The following example demonstrates uses of the Item property to access a particular instance ("Output1") of a collection-style repeated capability. capability.

Visual Basic Copy image Copy Code
Dim output as IIviDCPwrOutput
Set output = driver.Outputs.Item("Output1")

output.VoltageLevel = 3.5

Accessing Selector-Style Repeated Capabilities

The following example demonstrates how to access an instance named "Marker1" from a selector-style repeated capability:

Visual Basic Copy image Copy Code
Dim marker As IIviSpecAnMarker
Set marker = specAn.Marker

marker.ActiveMarker = "Marker1"
marker.Position = 1.2E9
marker.Enabled = true

Accessing Parameter-Style Repeated Capabilities

The following example demonstrates how to access an instance named "Channel1" from a parameter-style repeated capability:

Visual Basic Copy image Copy Code
Dim fm As IIviFgenFM
Set fm = fgen.FM

fm.Enabled("Channel1") = true
Dim enabled As Boolean
enabled = fm.Enabled("Channel1")

Complete Example

The following code demonstrates a simple console application that creates and initializes the driver, reads some properties, checks the instrument for errors, and closes the driver.

Complete, working example programs may be found by clicking the Windows Start Menu shortcut under:
All Programs, Agilent IVI Drivers, AgM9216, Examples

Visual Basic Copy image Copy Code
Sub Example()

  Dim driver As new AgM9216

  ' IIviDriverIdentity properties - Initialize not required
  Dim identifier As String
  identifier = driver.Identity.identifier
  Output.Text = Output.Text & "Identifer: " & identifier & vbCr & vbLf

  Dim revision As String
  revision = driver.Identity.revision
  Output.Text = Output.Text & "Revision: " & revision & vbCr & vbLf

  Dim vendor As String
  vendor = driver.Identity.vendor
  Output.Text = Output.Text & "Vendor: " & vendor & vbCr & vbLf

   ' Setup Resource Descriptor
  Dim resourceDesc As String
  resourceDesc = "PXI54::14::0::INSTR"

 ' Setup IVI-defined initialization options
  Dim standardInitOptions As String
  standardInitOptions = "Cache=false, InterchangeCheck=false, QueryInstrStatus=false, RangeCheck=false, RecordCoercions=false, Simulate=false"

  ' Setup driver-specific initialization options
  Dim driverSetupOptions As String
  driverSetupOptions = "DriverSetup= Model=M9216A, Trace=false"

  driver.Initialize resourceDesc, False, False, standardInitOptions + "," + driverSetupOptions

  ' IIviDriverIdentity properties - Initialize required
  Dim instModel As String
  instModel = driver.Identity.InstrumentModel
  Output.Text = Output.Text & "InstrumentModel: " & instModel & vbCr & vbLf

  Dim instFirmwareRevision As String
  instFirmwareRevision = driver.Identity.InstrumentFirmwareRevision
  Output.Text = Output.Text & "InstrumentFirmwareRevision: " & instFirmwareRevision & vbCr & vbLf

  Dim instManufacturer As String
  instManufacturer = driver.Identity.InstrumentManufacturer
  Output.Text = Output.Text & "InstrumentManufacturer: " & instManufacturer & vbCr & vbLf

  Dim dc As IIviDCPwr
  Set dc = driver

  ' TODO: Exercise driver methods and properties

  ' Check instrument for errors
  Dim errorNum As Long
  Dim errorMsg As String
  errorNum = -1
  While (errorNum <> 0)

    driver.Utility.ErrorQuery errorNum, errorMsg
    Output.Text = Output.Text & "ErrorQuery: " & errorNum & ", " & errorMsg & vbCr & vbLf

  Wend

  ' Close driver
  driver.Close

  End Sub


Using Agilent VEE Pro

[image]

AgM9216 IVI Driver Reference Agilent Technologies
Using Agilent VEE Pro®

Agilent VEE Pro 7.0 or greater is required. VEE Pro 7.5 or greater is recommended as it adds significant new features for using IVI-COM drivers. VEE Pro provides access to the AgM9216 driver COM object using .NET interop references. You may use Agilent VEE Pro's help for general information on using IVI-COM objects in Agilent VEE Pro. Look in the index for the following topics:
IVI, IVI-COM, Instrument Manager, Component Drivers

Referencing the AgM9216 IVI-COM Driver in VEE Pro

With VEE Pro 7.5 and above, it is recommended that you take advantage of the fully integrated and simplified "To/From IVI-COM" feature.

Open VEE Pro's Instrument Manager, if you have an instrument connected already, you can click the "Configure Drivers" button and VEE Pro will automatically search for the IVI-COM drivers installed on your machine. If an IVI-COM driver for your instrument is found, the "IVI-COM Driver" button will be enabled.

If you do not have an instrument connected, you can click on the "Properties" button and then the "Advanced" button, under the "IVI-COM" tab, select an IVI-COM driver or IVI-COM driver session in the drop-down list box. Click OK, and the "IVI-COM Driver" button will be enabled.

If you cannot find the driver in this list, it was not installed and registered properly. See Installation.

Creating an AgM9216 IVI-COM Driver Instance in VEE Pro

Open Instrument Manager again and select your instrument, click the "IVI-COM Driver" button. This will place an "To/From IVI-COM" object onto your workspace. Double click on the highlighted line, this will open a dialog to let you select the operations that you want to perform on the driver.

CreateInstance

Before you do anything else, double-click the first bolded operation, and click the OK button. This will add an operation to create an instance of the IVI-COM driver.

It is recommended that you use a global Declare Variable object for your driver instance object. This is more robust and provides easy access to your driver object throughout your program.

Initializing the Driver

Before you can do anything very interesting with an IVI-COM driver you must call its Initialize method. Double-click the second bolded operation. This will let you modify any initialization parameters.

ResourceName
This string identifies a particular instrument in the system. Its contents may be a VISA style string such as PXI54::14::0::INSTR.
IdQuery
This Boolean determines whether the driver interrogates the instrument about its identity and then verifies that the instrument is one suitable for the driver. The instrument model must be in the supported model list. If this parameter is False, the driver skips this verification.
Reset
This second Boolean determines whether the driver resets the instrument.
OptionString
The final parameter, a string, may set a number of driver properties. If the string is empty, the properties are set to default values or the values contained in the Configuration Store for this session.
Closing the Driver

You should always match your Initialize operation with the Close operation to release any resources. It is the third bolded operation in the "Select an Operation from" dialog.

Accessing Properties and Methods in VEE Pro

Now you can use the driver to program the instrument by accessing the driver's properties and methods. An IVI-COM driver is used the same way as other ActiveX objects are used in Agilent VEE Pro.

You can use a To/From IVI-COM object or you can use a formula box. For example, here is a To/From IVI-COM object. The first line creates an instance of the driver, the second line initializes the driver, the third line calls a method to clear the status, the fourth line sets a property to enable the display. The last line closes the driver.

The help file for the driver lists and explains all of the driver's methods and properties.

Descending the Interface Hierarchy in VEE Pro

An IVI-COM driver contains a hierarchy of interfaces. Many of the properties at the root are interface pointers.

So how does a VEE Pro program get to these members? From the To/From IVI-COM object, you see that this driver has a property called DriverOperation whose type is IIviDriverOperation. Now you can open up that tree node to discover all its methods and properties. Once you find the method or property that you want, double-click on it to do any editing and then the operation will be added to the To/From IVI-COM object.

These techniques for descending the interface hierarchy apply equally to the IVI inherent capabilities, class-compliant interfaces, and instrument-specific interfaces.

Keeping an Interface Pointer

If the program accesses many methods and properties in the same sub-interface or even uses the same method or property in a sub-interface many times, a more efficient programming technique is to create a reference to the interface. This efficiency becomes especially important if you are using DCOM to access the driver. If the program contains a formula box with:

A.DriverOperation.IoResourceDescriptor

Every time the code executes, Agilent VEE Pro queries the object for the DriverOperation property. While the time for this operation is very small when on the local machine, the time becomes measurable when done over a network.

To save this time, the program can hold a reference to the interface. A formula box would contain the line:

A.DriverOperation

The Result from this box is connected to formula boxes or .NET Operation Builders which use the DriverOperation interface. If this interface pointer is used many times, Agilent VEE Pro is saved from asking the driver for the same, static information that many times. That time saving becomes significant in a remote, DCOM environment.

Tip: to create a .NET Operation Builder for any .NET type, go to Device->.NET Operation Builder, click the Find toolbar button, and type in the type name or a part of the type name.

Handling COM Data Types in VEE Pro

Agilent VEE Pro can handle all COM automation data types. IVI-COM drivers are no exception and even purposely restrict the data types used by the driver to avoid any difficult programming tasks.

Boolean
The COM VARIANT_BOOL data type is used. Its value can be VARIANT_TRUE or VARIANT_FALSE.
Int32

The COM LONG data type is used for Int32 values.

Real64

The COM DOUBLE data type is used for Real64 values.

Text

The COM BSTR data type is used for text strings.

Array

The COM SAFEARRAY data type is for arrays.

Interface Pointer

An interface pointer's type is maintained by Agilent VEE Pro.

in, out parameters
Some parameters are declared to be both in and out. For these parameters, you must have an input and output for the parameter. The method call in the formula requires the keyword ByRef before these parameters. Two examples are ErrorQuery and SelfTest in IIviDriverUtility.

The formula box for doing an ErrorQuery would look like:

Further Information

To learn more about Using Agilent VEE Pro, visit:
http://www.agilent.com/find/vee.


Using LabVIEW

[image]

AgM9216 IVI Driver Reference Agilent Technologies
Using LabVIEW

National Instruments® LabVIEW® provides extensive support for COM components. Any COM component that restricts itself to automation data types (i.e. Visual Basic-compatible types) may be used directly from LabVIEW. Since all IVI-COM drivers use only automation data types, they can be used from LabVIEW in precisely the same manner as any other COM component.

There are two ways to access the AgM9216 IVI-COM driver in LabVIEW: using the Class Browser and using the IVI Class Driver VIs. This section discusses both techniques.

Using the LabVIEW Class Driver VIs

LabVIEW provides IVI Class Driver VIs that can be used to write interchangeable IVI applications. If interchangeability is the overriding requirement or if only the IVI-defined functions are needed in an application, then using the LabVIEW IVI Class Driver VIs is the preferred way to access the AgM9216 driver in LabVIEW. These VIs are located on the Functions palette under Instrument I/O -> IVI Class Drivers.

The COM Adapter

The IVI Class Driver VIs have the ability to load both IVI-COM and IVI-C drivers directly. If the driver includes an IVI-C wrapper, then the IVI Class Driver VIs will load the AgM9216 driver as if it were a native IVI-C driver. No extra steps are required on the part of the developer.

If an IVI driver does not include an IVI-C wrapper, then the IVI Class Driver VIs can still be used to load the IVI-COM native driver directly. There are two requirements for the IVI Class Driver VIs to be used with a native IVI-COM driver:

  1. The NI IVI Compliance Package 3.2 (or later) must be installed.
  2. The IVI-COM adapter feature must be enabled when installing the NI IVI Compliance Package. Note: This feature is disabled by default, so you must explicitly enable it when installing.

The LabVIEW Class Browser

The most convenient way to access the instrument-specific features of an IVI-COM driver is to use the Class Browser. This feature is available in LabVIEW version 8.0 and later. The Class Browser presents an intuitive hierarchical view of all methods and properties in the driver -- class-compliant and instrument-specific. From this hierarchical view, the LabVIEW developer can simply drag-n-drop methods and properties onto the block diagram and LabVIEW automatically creates the appropriately configured Invoke Node (for methods) or Property Node (for properties).

Building a Simple IVI Application in LabVIEW

This section provides step-by-step instructions for building a simple LabVIEW application with the AgM9216 IVI-COM driver.

Accessing the AgM9216 Driver from the Class Browser

The first step in building a LabVIEW application using an IVI-COM driver is to access the Class Browser and direct it to load the AgM9216 IVI-COM driver. From LabVIEW's perspective, the AgM9216 driver is simply a COM (aka "ActiveX") component. As such, it can be loaded via the ActiveX feature of the Class Browser.

To load the AgM9216 into the Class Browser

  1. From the View menu, choose Class Browser. The Class Browser window appears.
  2. From the Object Library combo box at the top, choose ActiveX and then Select Type Libraries... The system will likely pause for several seconds as LabVIEW scans your system for all installed COM components.
  3. From the Select Type Libraries dialog box that appears, check the checkbox labeled "IVI AgM9216 1.0 Type Library Version 1.0" and click OK.
  4. From the Class combo box, select AgM9216Lib.IAgM9216.
  5. The Properties and Methods window now displays the hierarchy of methods and properties available in the AgM9216 driver. The items with small blue dots are interface reference properties and allow you to navigate to sub-interfaces on the driver. Double-click on one of these, such as the System interface and the Properties and Methods window is updated to display the methods and properties of the sub-interface. To navigate back to the root of the hierarchy, click on the System hyperlink in the Selected property or method textbox near the bottom.

Initializing the Driver

The two main LabVIEW primitives required to access IVI-COM driver methods and properties are the Invoke Node (for methods) and the Property Node (for properties). Conveniently, the Class Browser automatically creates and configures these nodes for you.

Before any Invoke Node or Property Node can execute on the IVI-COM driver, it must be instantiated. This is accomplished using the Automation Open VI from the ActiveX palette. The following procedure explains how to instantiate and initialize the driver.

To instantiate and initialize the AgM9216 driver

  1. From the Class Browser, choose the Initialize node from the hierarchy displayed in the Properties and Methods window. Drag-n-drop the node onto the block diagram.
  2. The Automation Open VI is used to instantiate the IVI-COM driver before executing the Initialize function. Right-click on the Initialize Invoke Node just at the top left corner at the reference input, and select ActiveX Palette and then Automation Open. This creates the Automation Open VI. Make sure the Automation Refnum output of the Automation Open VI is wired to the reference input of the Initialize Invoke Node. Also, make sure the error clusters of the two VIs are wired together.
  3. The Automation Open VI requires an input control. Right-click on the Automation Refnum input of the Automation Open VI and choose Select ActiveX Class and then choose Browse.
  4. From the Type Library combo box at the top, choose "AgM9216 Version 1.0". Expand the AgM9216 node and choose IAgM9216 (the first interface under the expanded node). Click OK.
  5. LabVIEW creates an Automation Refnum input control and wires it to the Automation Open VI. Make sure the error clusters of the two VIs are wired together.
  6. At this point, the VI will not compile since some of the required inputs of the Initialize Invoke Node have not be supplied. Right-click on the ResourceName input of the Initialize Invoke Node and choose Create and then Constant. LabVIEW places a constant string on the diagram and wires it to the ResourceName input. In the string constant created, enter the appropriate VISA resource descriptor for connecting to the instrument.
  7. Right-click on the IdQuery input of the Initialize Invoke Node, choose Create and then Constant. LabVIEW creates a constant boolean wired to the IdQuery input. Repeat this process with the Reset input.
  8. At this point, the application is executable. LabVIEW will instantiate the AgM9216 IVI-COM driver and call the Initialize function. However, we must properly close the IVI-COM driver. We must also have the ability to read and write driver properties. These final tasks are covered in the next sections.

Reading and Writing Properties

Once the driver has been instantiated with the Automation Open VI and the Initialize function executes, any method or property on the AgM9216 driver can be invoked. The previous sections explained how to call the Initialize method. Other driver methods are accessed in precisely the same fashion.

This section explains how to read and write driver properties.

To access properties on the AgM9216 driver

  1. From the Class Browser, choose any property from the hierarchy displayed in the Properties and Methods window. Drag-n-drop the node onto the block diagram.
  2. LabVIEW creates a Property Node for that property on the diagram. Wire the reference out terminal of the Initialize Invoke Node to the reference input terminal of the Property Node. Also, wire the error clusters together.
  3. By default, the Property Node is configured to read a driver property, as indicated by the small arrow on the right side of the node's terminal. Right-click on the Property Node terminal and select Create and then choose Indicator. This places an output indicator on the diagram and wires it to the Property Node. This reads the value of the selected property from the driver and present it in the indicator.
  4. To use a Property Node to write a property value to the driver, simply right-click on the Property Node and choose Change to Write. This reconfigures the Property Node to be a "setter" node, as indicated by the re-positioning of the small arrow to the left side of the node terminal.
  5. A single Property Node can be used to read and write multiple properties. This is accomplished by resizing the Property Node vertically. Move the cursor over the node and resizing handles appear at the top and bottom of the node. Use the resizing handles to drag the border of the node down to display additional terminals.
  6. To configure a specific terminal to access a particular property, right-click on a terminal and choose Select Property.... This brings up an additional Class Browser window, from which you can select the desired property. You can configure individual terminals to read or write by right-clicking the specific terminal and choosing Change To Read or Change To Write as appropriate. Note that multi-terminal Property Nodes execute in order from top to bottom.

Closing the Driver

To complete a LabVIEW application using the AgM9216 driver, it is important to properly close the driver. If the driver is not properly closed, unexpected behavior and resource leaks could result. Moreover, it is important to understand when to close the driver. If multiple VIs within an LabVIEW application need to access the driver, the instantiation and initialization of the driver is typically done in a dedicated VI as is the close operation described in this section. You generally do not open, access, and close an IVI-COM driver within a single LabVIEW VI. Nevertheless, the procedure described here applies to a single VI application and to applications that share a driver instance.

To close the AgM9216 driver

  1. From the Class Browser, choose the Close node from the hierarchy displayed in the Properties and Methods window. Drag-n-drop the node onto the block diagram.
  2. Wire the reference out terminal of the last Invoke Node or Property Node in your VI to the reference input of the Close Invoke Node. Also, wire the error clusters together.
  3. Executing the Close method on the driver instructs the driver to release any resources it is holding. It does not, however, tell LabVIEW to dispose of the driver instance. This is accomplished with the Close Reference VI.
  4. Right-click on the reference out terminal of the Close Invoke Node and choose ActiveX Palette and then select Reference Close.
  5. Wire the reference out terminal of the Close Invoke Node to the reference input of the Close Reference VI.
  6. Your simple LabVIEW application using the AgM9216 driver is now complete.


Using MATLAB

[image]

AgM9216 IVI Driver Reference Agilent Technologies
Using MATLAB®

MATLAB® provides rich support for building applications with IVI-COM drivers. Special preconfigured MATLAB classes allow you to access IVI-defined functionality. In addition, for accessing instrument-specific functionality, the AgM9216 driver includes a MATLAB wrapper file that is automatically installed by the AgM9216 driver installer at the following location:

    • For 32 bit platform : \Program Files\IVI Foundation\IVI\Components\MATLAB
    • For 64 bit platform : \Program Files (x86)\IVI Foundation\IVI\Components\MATLAB

Requirements for Using the AgM9216 in MATLAB

The following components are required to be installed (at the time the AgM9216 driver installer runs), in order to use the AgM9216 driver in MATLAB:

  • MATLAB R2011a (32-bit Version only) for both 32 bit and 64 bit platforms
  • MATLAB Instrument Control Toolbox

Accessing Class-Compliant Functionality

Access to class-compliant functionality in an IVI driver is provided by the MATLAB Class objects. You use the appropriate MATLAB Class to create an instrument object. These classes are located in the instrument.ivicom package.

Note: If the class is listed as 'NoClass' below, this driver does not support an IVI instrument class and this section may be disregarded.

The following code demonstrates how to access the 'NoClass' class supported by the AgM9216 driver.

driver = instrument.ivicom.NoClass(‘MyLogicalName’);

Note that in addition to using the logical name to identify the driver to use (as shown in the example above), you can also use the session name or the software module name. Please see the topic Configuring the Driver for information on these additional identifiers.

Accessing Instrument-Specific Functionality

In order to access the instrument-specific functionality of the AgM9216 driver, the driver must be directly referenced. Note that directly referencing the AgM9216 driver provides access to the class-compliant functionality as well. The class for the AgM9216 driver is located in the instrument.driver package.

The following code demonstrates how to directly access the AgM9216 driver.

driver = instrument.driver.AgM9216();

The DeviceSpecific property is used to gain access to the instrument-specific methods and properties, as shown below.

driver.DeviceSpecific.System.WaitForOperationComplete(2000);

Complete Example

The following code demonstrates a simple console application that creates and initializes the driver, reads some properties, checks the instrument for errors, and closes the driver.

Complete, working example programs may be found by clicking the Windows Start Menu shortcut under:
All Programs, Agilent IVI Drivers, AgM9216, Examples

MATLAB Copy image Copy Code
    % Creates a driver object, reads a few Identity interface
    % properties, and checks the instrument error queue.
    %
    % Runs in simulation mode without an instrument.

disp(blanks(1)');
disp('  ML_Example1');
try

    % Create driver instance
    driver = instrument.driver.AgM9216();

    % Edit resource and options as needed.  Resource is ignored if option Simulate=true
    resourceDesc = 'PXI54::14::0::INSTR';

    initOptions = 'QueryInstrStatus=true, Simulate=true, DriverSetup= Model=, Trace=false';
    idquery = true;
    reset   = true;

    driver.Initialize(resourceDesc, idquery, reset, initOptions);
    disp('Driver Initialized');

    % Print a few IIviDriver.Identity properties
    disp(['Identifier:      ', driver.Identity.Identifier]);
    disp(['Revision:        ', driver.Identity.Revision]);
    disp(['Vendor:          ', driver.Identity.Vendor]);
    disp(['Description:     ', driver.Identity.Description]);
    disp(['InstrumentModel: ', driver.Identity.InstrumentModel]);
    disp(['FirmwareRev:     ', driver.Identity.InstrumentFirmwareRevision]);
    disp(blanks(1));

    % TODO: Exercise 'DeviceSpecific' driver methods and properties
    % Example syntax: serNum = driver.DeviceSpecific.System.SerialNumber;

    % Check instrument for errors
    errorNum = -1;
    errorMsg = ('');
    disp(blanks(1)');
    while (errorNum ~= 0)
        [errorNum, errorMsg] = driver.Utility.ErrorQuery();
        disp(['ErrorQuery: ', num2str(errorNum), ', ', errorMsg]);
    end

catch exception
    disp(getReport(exception));
end

if driver.Initialized
    driver.Close();
    disp('Driver Closed');
end

disp('Done');
disp(blanks(1)');

Further Information

To learn more about using MATLAB with IVI instrument drivers, visit:
http://www.mathworks.com/ivi.


Reference

[image]

AgM9216 IVI Driver Reference Agilent Technologies
Reference

The topics in this section document each method and property exposed from the IVI-COM driver. Both a hierarchical and flat view of the AgM9216 driver functionality are available, as is a listing of instrument command strings and their associated driver methods and properties.

In This Section

Driver Hierarchy

Presents a hierarchical view of all driver methods and properties.

Driver Interfaces

Presents the driver functionality in a flat list of interfaces.

Instrument Command Reference

Provides a table associating instrument command strings with driver methods and properties.

Errors and Warnings

Presents all driver errors and warnings.


IVI-COM Hierarchy

[image]

AgM9216 IVI Driver Reference Agilent Technologies
IVI-COM Hierarchy

Please click the Locate button to go to the Driver Hierarchy node in the Contents panel. Use the Contents panel to navigate the driver hierarchy.


IAgM9216 Interface

[image]

AgM9216 IVI Driver Reference Agilent Technologies
IAgM9216 Interface
See Also

IAgM9216 interface.

Namespace: Agilent.AgM9216.Interop
Assembly: Agilent.AgM9216.Interop (in Agilent.AgM9216.Interop.dll)

Syntax

Visual Basic
Public Interface IAgM9216
   Inherits IIviDriver
C#
public interface IAgM9216 : IIviDriver
Visual C++
__interface IAgM9216 : IIviDriver

Properties

 | Name | Description
Public property | Acquisition | Pointer to the IAgM9216Acquisition interface.
Public property | Channels | Pointer to the IAgM9216Channels interface.
Public property | DriverOperation | Pointer to the IIviDriverOperation interface (Inherited from IIviDriver.)
Public property | Identity | Pointer to the IIviDriverIdentity interface (Inherited from IIviDriver.)
Public property | Initialized | Initialized is True between a successful call to the Initialize method and a successful call to the Close method, and False at all other times. (Inherited from IIviDriver.)
Public property | MeasurementMode | This property determines whether the M9216A is set in Single channel or Multiple Channel personality. When this property is changed, the device's configuration properties will be reinitialized to the default settings. InputConnector for all channels will be set to 1. An update hardware command will also be sent to the hardware.
Public property | System | Pointer to the IAgM9216System interface.
Public property | TriggerMode | This property sets whether the M9216A channels uses the trigger level settings to perform the measurement, or to instead acquire data immediately upon receiving the Initiate command.
Public property | Utility | Pointer to the IIviDriverUtility interface (Inherited from IIviDriver.)
Top

Methods

 | Name | Description
Public method | Close | Closes the I/O session to the instrument. Driver methods and properties that access the instrument are not accessible after Close is called. (Inherited from IIviDriver.)
Public method | Initialize | Opens the I/O session to the instrument. Driver methods and properties that access the instrument are only accessible after Initialize is called. Initialize optionally performs a Reset and queries the instrument to validate the instrument model. (Inherited from IIviDriver.)
Public method | UpdateHardware | Loads the digitizer configuration and connector selection into the hardware. All changes to configuration settings and connector selection are cached in the host driver until this command is called. This command effectively synchronizes the host driver and hardware.
Top

See Also

Reference

Agilent.AgM9216.Interop Namespace


Acquisition Property

[image]

AgM9216 IVI Driver Reference Agilent Technologies
IAgM9216..::.Acquisition Property
IAgM9216 See Also

Pointer to the IAgM9216Acquisition interface.

Namespace: Agilent.AgM9216.Interop
Assembly: Agilent.AgM9216.Interop (in Agilent.AgM9216.Interop.dll)

Syntax

Visual Basic
Public ReadOnly Property Acquisition As IAgM9216Acquisition
C#
public IAgM9216Acquisition  Acquisition { get; }
Visual C++
HRESULT get_Acquisition(
    IAgM9216Acquisition**  val
);

See Also

Reference

IAgM9216 Interface
Agilent.AgM9216.Interop Namespace


GetStatus Method

[image]

AgM9216 IVI Driver Reference Agilent Technologies
IAgM9216Acquisition..::.GetStatus Method
IAgM9216Acquisition See Also

This function can be used to check the acquisition status of the digitizer's channel. The status can any of the following as shown in remark section below.

Namespace: Agilent.AgM9216.Interop
Assembly: Agilent.AgM9216.Interop (in Agilent.AgM9216.Interop.dll)

Syntax

Visual Basic
Public Function GetStatus ( _
) As AgM9216AcquisitionStatusEnum()
C#
public AgM9216AcquisitionStatusEnum[]   GetStatus(
)
Visual C++
HRESULT GetStatus(
    SAFEARRAY**  retval
);

Return Value

Remarks

AgM9216DigitizerRangeSelectLow - Fetch only the wavefrom from 5V Range sub channel.

AgM9216DigitizerRangeSelectHigh - Fetch only the wavefrom from 100V Range sub channel.

AgM9216DigitizerRangeSelectBoth[Default] - Fetch the wavefrom from both the 5V and 100V Range sub channels.

AgM9216DigitizerRangeSelectNone - Do not prefetch any data.

Note: If both the low and high range data have been prefetched to the driver (i.e Channels.Measurement.RangeSelect = AgM9216MeasurementRangeSelectBoth), this parameter selects which data range is copied to user memory(buffer). Otherwise this parameter is ignored. Valid input : AgM9216DigitizerRangeSelectLow & AgM9216DigitizerRangeSelectHigh

See Also

Reference

IAgM9216Acquisition Interface
Agilent.AgM9216.Interop Namespace


Initiate Method

[image]

AgM9216 IVI Driver Reference Agilent Technologies
IAgM9216Acquisition..::.Initiate Method
IAgM9216Acquisition See Also

This function causes the M9216 to start acquiring waveform on all channels. In AgM9216TriggerModeImmediate mode, all channels will start waveform acquisiton. In AgM9216TriggerModeChannel mode, each channel will wait for a valid trigger from its source signal before acquiring data..

Namespace: Agilent.AgM9216.Interop
Assembly: Agilent.AgM9216.Interop (in Agilent.AgM9216.Interop.dll)

Syntax

Visual Basic
Public Sub Initiate ( _
)
C#
public void  Initiate(
)
Visual C++
HRESULT Initiate(
);

Remarks

This function returns immediately. The status of the acquisition can be polled by using GetStatus. Call WaitforAcquisitonToComplete if user desires to wait for the M9216 to complete acquisition.

See Also

Reference

IAgM9216Acquisition Interface
Agilent.AgM9216.Interop Namespace


WaitForAcquisitionComplete Method

[image]

AgM9216 IVI Driver Reference Agilent Technologies
IAgM9216Acquisition..::.WaitForAcquisitionComplete Method
IAgM9216Acquisition See Also

Waits until the initiated acquisition is complete. Acquisition is complete when all channel(s) have successfully acquired the waveform or timed out waiting for a valid trigger. If no acquisition is currently running, this function returns immediately.

Namespace: Agilent.AgM9216.Interop
Assembly: Agilent.AgM9216.Interop (in Agilent.AgM9216.Interop.dll)

Syntax

Visual Basic
Public Sub WaitForAcquisitionComplete ( _
)
C#
public void  WaitForAcquisitionComplete(
)
Visual C++
HRESULT WaitForAcquisitionComplete(
);

See Also

Reference

IAgM9216Acquisition Interface
Agilent.AgM9216.Interop Namespace


Channels Property

[image]

AgM9216 IVI Driver Reference Agilent Technologies
IAgM9216..::.Channels Property
IAgM9216 See Also

Pointer to the IAgM9216Channels interface.

Namespace: Agilent.AgM9216.Interop
Assembly: Agilent.AgM9216.Interop (in Agilent.AgM9216.Interop.dll)

Syntax

Visual Basic
Public ReadOnly Property Channels As IAgM9216Channels
C#
public IAgM9216Channels  Channels { get; }
Visual C++
HRESULT get_Channels(
    IAgM9216Channels**  val
);

Remarks

Min: 0

Default: 1000000 (1 s)

Max: 16000000 (16 s)

A zero setting will cause the channel to timeout immediately, and no measurement will be made on that channel. Note that when the M9216 is in AgM9216MeasurementModeMultiple mode , the longest TimeOut setting of all the eight channels will determine the maximum period WaitForAcquisitionToComplete waits before returning.

See Also

Reference

IAgM9216 Interface
Agilent.AgM9216.Interop Namespace


Count Property

[image]

AgM9216 IVI Driver Reference Agilent Technologies
IAgM9216Channels..::.Count Property
IAgM9216Channels See Also

-- READ ONLY -- This property determines the number of channels available in the digitizer. When the digitizer is in multiple channel mode, the return value is eight. In single channel mode, the return value is one.

Namespace: Agilent.AgM9216.Interop
Assembly: Agilent.AgM9216.Interop (in Agilent.AgM9216.Interop.dll)

Syntax

Visual Basic
Public ReadOnly Property Count As Integer
C#
public int  Count { get; }
Visual C++
HRESULT get_Count(
    long*  val
);

See Also

Reference

IAgM9216Channels Interface
Agilent.AgM9216.Interop Namespace


Item Property

[image]

AgM9216 IVI Driver Reference Agilent Technologies
IAgM9216Channels..::.Item Property
IAgM9216Channels See Also

Channels Item uniquely identifies the channel in the channels collection. It returns a pointer to the IAgM9216Channel interface.

Namespace: Agilent.AgM9216.Interop
Assembly: Agilent.AgM9216.Interop (in Agilent.AgM9216.Interop.dll)

Syntax

Visual Basic
Public ReadOnly Property Item( _
    ByVal  Name As String  _
) As IAgM9216Channel
C#
public IAgM9216Channel  get_Item(
    string  Name
)
Visual C++
HRESULT get_Item(
    BSTR  Name,
    IAgM9216Channel**  val
);

Parameters

Name

The name of a channel. It may be either a name returned by the Name property or a name mapped to a particular repeated capability in the session in the configuration store.For valid values, see the Channel repeated capability.

See Also

Reference

IAgM9216Channels Interface
Agilent.AgM9216.Interop Namespace


AuxOutEnabled Property

[image]

AgM9216 IVI Driver Reference Agilent Technologies
IAgM9216Channel..::.AuxOutEnabled Property
IAgM9216Channel See Also

Set this property to true to switch the currently selected input port to instead become an auxiliary output port of the digitizer. A true setting is not allowed in AgM9216MeasurementModeSingle mode. Users are not allowed to switch to Auxiliary ports in this mode.

Namespace: Agilent.AgM9216.Interop
Assembly: Agilent.AgM9216.Interop (in Agilent.AgM9216.Interop.dll)

Syntax

Visual Basic
Public Property AuxOutEnabled As Boolean
C#
public bool  AuxOutEnabled { get; set; }
Visual C++
HRESULT get_AuxOutEnabled(
    VARIANT_BOOL*  val
);
HRESULT put_AuxOutEnabled(
    VARIANT_BOOL  val
);

Remarks

Note that setting this property will also determine that AuxOutEnabled state of the digitizer within the same bank. For example

spDriver->Acquisition->Channels->Item("Channel1")->AuxOutEnabled=true;

will also result in

spDriver->Acquisition->Channels->Item("Channel2")-> AuxOutEnabled=true;

because Digitizer 1 and Digitizer 2 are members of the same bank. See Table 1.1 for the M9216's organization.

See Also

Reference

IAgM9216Channel Interface
Agilent.AgM9216.Interop Namespace


BankID Property

[image]

AgM9216 IVI Driver Reference Agilent Technologies
IAgM9216Channel..::.BankID Property
IAgM9216Channel See Also

-- READ ONLY -- In multichannel mode this property returns the bank number of the specified digitizer(channel). In Single Channel mode, there is only one logical digitizer channel, the value returned is always 0. See the link further below for a table of information..

Namespace: Agilent.AgM9216.Interop
Assembly: Agilent.AgM9216.Interop (in Agilent.AgM9216.Interop.dll)

Syntax

Visual Basic
Public ReadOnly Property BankID As Integer
C#
public int  BankID { get; }
Visual C++
HRESULT get_BankID(
    long*  val
);

Remarks

Please refer to Table 1.1

See Also

Reference

IAgM9216Channel Interface
Agilent.AgM9216.Interop Namespace


Configure Method

[image]

AgM9216 IVI Driver Reference Agilent Technologies
IAgM9216Channel..::.Configure Method
IAgM9216Channel See Also

This function allows the user to configure any of the input ports that belongs to this channel. InputPort does not have to be the currently selected port. The M9216A allows each input port to have a unique configuration. When the user selects an input port for acquistion, using the InputPort (or InputConnectorSelection) property, the digitizer channel will automatically be configured with the port's configuration.Note that if the InputPort does not belong to the channel , an error code will be returned.

Namespace: Agilent.AgM9216.Interop
Assembly: Agilent.AgM9216.Interop (in Agilent.AgM9216.Interop.dll)

Syntax

Visual Basic
Public Sub Configure ( _
    ByVal  InputPort As Integer  _
    ByVal  RecordSize As Integer  _
    ByVal  Level As Double  _
    ByVal  Hysteresis As Double  _
    ByVal  HoldOffCount As Integer  _
    ByVal  TimeOut As Integer  _
    ByVal  PreTriggerSamples As Integer  _
    ByVal  Delay As Integer  _
    ByVal  Slope As AgM9216TriggerSlopeEnum  _
)
C#
public void  Configure(
    int  InputPort,
    int  RecordSize,
    double  Level,
    double  Hysteresis,
    int  HoldOffCount,
    int  TimeOut,
    int  PreTriggerSamples,
    int  Delay,
    AgM9216TriggerSlopeEnum  Slope
)
Visual C++
HRESULT Configure(
    long  InputPort,
    long  RecordSize,
    double  Level,
    double  Hysteresis,
    long  HoldOffCount,
    long  TimeOut,
    long  PreTriggerSamples,
    long  Delay,
    AgM9216TriggerSlopeEnum  Slope
);

Parameters

InputPort

The input port to configure. Must be a valid port for the channel.

RecordSize

Sets the number of samples to acquire for the waveform.

Level

Specifies the voltage threshold for the trigger sub-system. The units are Volts. Note that this setting is ignored if TriggerMode is AgM9216TriggerModeImmediate.

Hysteresis

Specifies the trigger hysteresis in Volts. Note that this setting is ignored if TriggerMode is AgM9216TriggerModeImmediate.

HoldOffCount

Specifies the number of valid edges to detect before waveform recording can occur. Note that this setting is ignored if TriggerMode is AgM9216TriggerModeImmediate.

TimeOut

Specifies the maximum allowable time for the channel to detect a valid trigger condition as specified by the configuration parameters. If the trigger condition is not met, a AgM9216AcquisitionStatusTimeOut is returned as acquisition status.The units are set in multiples of one microsecond.This setting is ignored if TriggerMode is AgM9216TriggerModeImmediate.

PreTriggerSamples

Specifies the number of samples that must be collected before a trigger event will be recognized. This value must not exceed the RecordSize of the waveform.This setting is ignored if TriggerMode is AgM9216TriggerModeImmediate.

Delay

Specifies the length of time from the valid trigger event to the first point in the waveform record. The units are in microseconds. The hardware resolution is microsecond and the driver will store the value closest to the hardware resolution.

Slope

Specifies trigger slope for the input port as either rising edge, falling edge ,both edges or DC level.Valid values are AgM9216TriggerSlopePositive , AgM9216TriggerSlopeNegative, AgM9216TriggerSlopeBoth and AgM9216TriggerSlopeLevel .This setting is ignored if TriggerMode is AgM9216TriggerModeImmediate.

Remarks

The user may also configure (and read) the configuration of the currently selected InputPort by using the properties.

See Also

Reference

IAgM9216Channel Interface
Agilent.AgM9216.Interop Namespace


InputConnectorSelection Property

[image]

AgM9216 IVI Driver Reference Agilent Technologies
IAgM9216Channel..::.InputConnectorSelection Property
IAgM9216Channel See Also

Select the logical input connector to for each channel. In AgM9216MeasurementModeMultiple mode, there are four input connectors for each channel while in AgM9216MeasurementModeSingle mode, the Input Port selection must be used to specify which physical connection will supply the signal to be measured.The input will be either connected to the specified digitizer (channel) or the auxiliary output port, depending upon the AuxOutEnabled setting.

Namespace: Agilent.AgM9216.Interop
Assembly: Agilent.AgM9216.Interop (in Agilent.AgM9216.Interop.dll)

Syntax

Visual Basic
Public Property InputConnectorSelection As Integer
C#
public int  InputConnectorSelection { get; set; }
Visual C++
HRESULT get_InputConnectorSelection(
    long*  val
);
HRESULT put_InputConnectorSelection(
    long  val
);

Remarks

Refer to Table 1.1 for the relationship between InputPort and InputConnectorSelection.

See Also

Reference

IAgM9216Channel Interface
Agilent.AgM9216.Interop Namespace


InputPort Property

[image]

AgM9216 IVI Driver Reference Agilent Technologies
IAgM9216Channel..::.InputPort Property
IAgM9216Channel See Also

Select the input port for the channel. Note that the multiplexer relays in the hardware will only be activated after the UpdateHardware command is sent.The input port will be either connected to the specified digitizer (channel) or auxiliary out port, depending on the AuxOutEnabled property setting.

Namespace: Agilent.AgM9216.Interop
Assembly: Agilent.AgM9216.Interop (in Agilent.AgM9216.Interop.dll)

Syntax

Visual Basic
Public Property InputPort As Integer
C#
public int  InputPort { get; set; }
Visual C++
HRESULT get_InputPort(
    long*  val
);
HRESULT put_InputPort(
    long  val
);

Remarks

NOTE: In single channel

If the user prefer to switch using the logical port identification, use InputConnectorSelection property instead. Refer to Table 1.1 for the relationship between InputPort and InputConnectorSelection.

See Also

Reference

IAgM9216Channel Interface
Agilent.AgM9216.Interop Namespace


Measurement Property

[image]

AgM9216 IVI Driver Reference Agilent Technologies
IAgM9216Channel..::.Measurement Property
IAgM9216Channel See Also

Pointer to the IAgM9216ChannelsMeasurement interface.

Namespace: Agilent.AgM9216.Interop
Assembly: Agilent.AgM9216.Interop (in Agilent.AgM9216.Interop.dll)

Syntax

Visual Basic
Public ReadOnly Property Measurement As IAgM9216ChannelMeasurement
C#
public IAgM9216ChannelMeasurement  Measurement { get; }
Visual C++
HRESULT get_Measurement(
    IAgM9216ChannelMeasurement**  val
);

See Also

Reference

IAgM9216Channel Interface
Agilent.AgM9216.Interop Namespace


FetchWaveformInt32 Method

[image]

AgM9216 IVI Driver Reference Agilent Technologies
IAgM9216ChannelMeasurement..::.FetchWaveformInt32 Method
IAgM9216ChannelMeasurement See Also

When an acquisition for a channel has been completed successfully, acquisition data will be sent from the channel to the controller's driver memory. The user can use this function to copy the data into the user's buffer.

Namespace: Agilent.AgM9216.Interop
Assembly: Agilent.AgM9216.Interop (in Agilent.AgM9216.Interop.dll)

Syntax

Visual Basic
Public Function FetchWaveformInt32 ( _
    ByVal  NoOfSamples As Integer  _
    ByVal  Range As AgM9216MeasurementRangeSelectEnum  _
) As Integer()
C#
public int[]   FetchWaveformInt32(
    int  NoOfSamples,
    AgM9216MeasurementRangeSelectEnum  Range
)
Visual C++
HRESULT FetchWaveformInt32(
    long  NoOfSamples,
    AgM9216MeasurementRangeSelectEnum  Range
    SAFEARRAY**  retval
);

Parameters

NoOfSamples

Specifies the number of points to be retrieved to the WaveformArray buffer.

Range

If both the low and high range data has been prefetched to the driver, his parameter selects which data range is copied to user memory.Otherwise this parameter is ignored.Valid input : AgM9216DigitizerRangeSelectLowAgM9216DigitizerRangeSelectHigh

Return Value

Remarks

Note that when an acquisition for a channel is not successful (i.e. timed out) or the user has chosen not to retrieve any data from the channel (by setting the RangeSelect property), no data for that channel will be available.

In these cases the FetchWaveformInt32 function will fill the user's array with value -65536 to indicate to the user that the data is invalid.

See Also

Reference

IAgM9216ChannelMeasurement Interface
Agilent.AgM9216.Interop Namespace


FetchWaveformReal64 Method

[image]

AgM9216 IVI Driver Reference Agilent Technologies
IAgM9216ChannelMeasurement..::.FetchWaveformReal64 Method
IAgM9216ChannelMeasurement See Also

When an acquisition has been completed successfully, data will be prefetched from the hardware to the controller's driver memory. The user uses this function to calculate the actual voltage of the waveform and copy the result into user?s buffer. The voltage is calculated with the stored calibration coefficient.Note that when an acquisition is not successful, no data will be prefetched to the driver. The user can also choose not to prefetch any data by using the RangeSelect property.

Namespace: Agilent.AgM9216.Interop
Assembly: Agilent.AgM9216.Interop (in Agilent.AgM9216.Interop.dll)

Syntax

Visual Basic
Public Function FetchWaveformReal64 ( _
    ByVal  NoOfSamples As Integer  _
    ByVal  Range As AgM9216MeasurementRangeSelectEnum  _
) As Double()
C#
public double[]   FetchWaveformReal64(
    int  NoOfSamples,
    AgM9216MeasurementRangeSelectEnum  Range
)
Visual C++
HRESULT FetchWaveformReal64(
    long  NoOfSamples,
    AgM9216MeasurementRangeSelectEnum  Range
    SAFEARRAY**  retval
);

Parameters

NoOfSamples

Specifies the number of points to be retrieved to the WaveformArray buffer.

Range

If both the low and high range data has been prefetched to the driver, this parameter selects which data range is copied to user memory.Otherwise this parameter is ignored.Valid input : AgM9216DigitizerRangeSelectLowAgM9216DigitizerRangeSelectHigh

Return Value

Remarks

Note that when an acquisition for a channel is not successful (i.e. timed out) or the user has chosen not to retrieve any data from the channel (by setting the RangeSelect property), no data for that channel will be available. In these cases the FetchWaveformReal64 function will fill the user's array with value 1.0e35 to indicate to the user that the data is invalid.

See Also

Reference

IAgM9216ChannelMeasurement Interface
Agilent.AgM9216.Interop Namespace


RangeSelect Property

[image]

AgM9216 IVI Driver Reference Agilent Technologies
IAgM9216ChannelMeasurement..::.RangeSelect Property
IAgM9216ChannelMeasurement See Also

Selects which waveform data from the 5V and 100V sub channels of the digitizer will be fetched to the driver after completing acquisition.When the M9216 is reset, the default value is AgM9216DigitizerRangeSelectBoth.

Namespace: Agilent.AgM9216.Interop
Assembly: Agilent.AgM9216.Interop (in Agilent.AgM9216.Interop.dll)

Syntax

Visual Basic
Public Property RangeSelect As AgM9216MeasurementRangeSelectEnum
C#
public AgM9216MeasurementRangeSelectEnum  RangeSelect { get; set; }
Visual C++
HRESULT get_RangeSelect(
    AgM9216MeasurementRangeSelectEnum*  val
);
HRESULT put_RangeSelect(
    AgM9216MeasurementRangeSelectEnum  val
);

Remarks

AgM9216DigitizerRangeSelectLow - Fetch only the wavefrom from 5V Range sub channel.

AgM9216DigitizerRangeSelectHigh - Fetch only the wavefrom from 100V Range sub channel.

AgM9216DigitizerRangeSelectBoth[Default] - Fetch the wavefrom from both the 5V and 100V Range sub channels.

AgM9216DigitizerRangeSelectNone - Do not prefetch any data.

Note: If both the low and high range data have been prefetched to the driver (i.e Channels.Measurement.RangeSelect = AgM9216MeasurementRangeSelectBoth), this parameter selects which data range is copied to user memory(buffer). Otherwise this parameter is ignored. Valid input : AgM9216DigitizerRangeSelectLow & AgM9216DigitizerRangeSelectHigh

See Also

Reference

IAgM9216ChannelMeasurement Interface
Agilent.AgM9216.Interop Namespace


RecordSize Property

[image]

AgM9216 IVI Driver Reference Agilent Technologies
IAgM9216Channel..::.RecordSize Property
IAgM9216Channel See Also

Sets or reads the number of samples to acquire for the waveform. This property applies for the currently selected port. To set the record length for a port that is not currently selected, use the Configure function.

Namespace: Agilent.AgM9216.Interop
Assembly: Agilent.AgM9216.Interop (in Agilent.AgM9216.Interop.dll)

Syntax

Visual Basic
Public Property RecordSize As Integer
C#
public int  RecordSize { get; set; }
Visual C++
HRESULT get_RecordSize(
    long*  val
);
HRESULT put_RecordSize(
    long  val
);

Remarks

Allowable setting.

Min: 0

Default: 5000

Max: 30000 ( Multiple Channel mode )

Max: 240000 ( SingleChannel mode )

See Also

Reference

IAgM9216Channel Interface
Agilent.AgM9216.Interop Namespace


Trigger Property

[image]

AgM9216 IVI Driver Reference Agilent Technologies
IAgM9216Channel..::.Trigger Property
IAgM9216Channel See Also

Pointer to the IAgM9216ChannelTrigger interface.

Namespace: Agilent.AgM9216.Interop
Assembly: Agilent.AgM9216.Interop (in Agilent.AgM9216.Interop.dll)

Syntax

Visual Basic
Public ReadOnly Property Trigger As IAgM9216ChannelTrigger
C#
public IAgM9216ChannelTrigger  Trigger { get; }
Visual C++
HRESULT get_Trigger(
    IAgM9216ChannelTrigger**  val
);

See Also

Reference

IAgM9216Channel Interface
Agilent.AgM9216.Interop Namespace


Delay Property

[image]

AgM9216 IVI Driver Reference Agilent Technologies
IAgM9216ChannelTrigger..::.Delay Property
IAgM9216ChannelTrigger See Also

Specifies the length of time from the valid trigger event to the first point in the waveform record. The units are in microseconds. See example code in Remarks section. Note that this setting is ignored if TriggerMode is AgM9216TriggerModeImmediate.

Namespace: Agilent.AgM9216.Interop
Assembly: Agilent.AgM9216.Interop (in Agilent.AgM9216.Interop.dll)

Syntax

Visual Basic
Public Property Delay As Integer
C#
public int  Delay { get; set; }
Visual C++
HRESULT get_Delay(
    long*  val
);
HRESULT put_Delay(
    long  val
);

Remarks

Allowable setting in microseconds.

Min: 0

Default: 0

Max: 16000000

Example

spDriver->Acquisition->Channels->Item("Channel1")->Trigger->Delay=5004 ;

The value stored for the trigger delay will be 5004 microseconds.

See Also

Reference

IAgM9216ChannelTrigger Interface
Agilent.AgM9216.Interop Namespace


HoldOffCount Property

[image]

AgM9216 IVI Driver Reference Agilent Technologies
IAgM9216ChannelTrigger..::.HoldOffCount Property
IAgM9216ChannelTrigger See Also

Specifies the number of valid edges to detect before waveform recording can occur.Note that this setting is ignored if TriggerMode is AgM9216TriggerModeImmediate

Namespace: Agilent.AgM9216.Interop
Assembly: Agilent.AgM9216.Interop (in Agilent.AgM9216.Interop.dll)

Syntax

Visual Basic
Public Property HoldOffCount As Integer
C#
public int  HoldOffCount { get; set; }
Visual C++
HRESULT get_HoldOffCount(
    long*  val
);
HRESULT put_HoldOffCount(
    long  val
);

Remarks

Allowable values. Errorcode will be returned if parameter is not valid.

Min: 1

Default: 1

Max: 255

See Also

Reference

IAgM9216ChannelTrigger Interface
Agilent.AgM9216.Interop Namespace


Hysteresis Property

[image]

AgM9216 IVI Driver Reference Agilent Technologies
IAgM9216ChannelTrigger..::.Hysteresis Property
IAgM9216ChannelTrigger See Also

Specifies the trigger hysteresis in Volts. Note that this setting is ignored if TriggerMode is AgM9216TriggerModeImmediate.

Namespace: Agilent.AgM9216.Interop
Assembly: Agilent.AgM9216.Interop (in Agilent.AgM9216.Interop.dll)

Syntax

Visual Basic
Public Property Hysteresis As Double
C#
public double  Hysteresis { get; set; }
Visual C++
HRESULT get_Hysteresis(
    double*  val
);
HRESULT put_Hysteresis(
    double  val
);

Remarks

Allowable values in Volts. Errorcode will be returned if parameter is not valid.

Min: 0

Default: 0.0001

Max: 0.5

See Also

Reference

IAgM9216ChannelTrigger Interface
Agilent.AgM9216.Interop Namespace


Level Property

[image]

AgM9216 IVI Driver Reference Agilent Technologies
IAgM9216ChannelTrigger..::.Level Property
IAgM9216ChannelTrigger See Also

Specifies the voltage threshold for the trigger sub-system. The units are Volts.Note that this setting is ignored if TriggerMode is AgM9216TriggerModeImmediate.

Namespace: Agilent.AgM9216.Interop
Assembly: Agilent.AgM9216.Interop (in Agilent.AgM9216.Interop.dll)

Syntax

Visual Basic
Public Property Level As Double
C#
public double  Level { get; set; }
Visual C++
HRESULT get_Level(
    double*  val
);
HRESULT put_Level(
    double  val
);

Remarks

Each channel has two concurrently active 5V and 100V subchannels during acquisition. When the absolute value of the level is set to less then 4.5V , the 5V sub-channel data will be used to determine trigger. Otherwise the 100V channel is used. An error code will be returned if the parameter is not valid. Allowable absolute values

Min: 0.0

Default: 1.0

Max: 100.0

See Also

Reference

IAgM9216ChannelTrigger Interface
Agilent.AgM9216.Interop Namespace


PreTriggerSamples Property

[image]

AgM9216 IVI Driver Reference Agilent Technologies
IAgM9216ChannelTrigger..::.PreTriggerSamples Property
IAgM9216ChannelTrigger See Also

Specifies the number of samples that must be collected before a trigger event will be recognized. This value must not exceed the RecordSize of the waveform.This setting is ignored if TriggerMode is AgM9216TriggerModeImmediate.

Namespace: Agilent.AgM9216.Interop
Assembly: Agilent.AgM9216.Interop (in Agilent.AgM9216.Interop.dll)

Syntax

Visual Basic
Public Property PreTriggerSamples As Integer
C#
public int  PreTriggerSamples { get; set; }
Visual C++
HRESULT get_PreTriggerSamples(
    long*  val
);
HRESULT put_PreTriggerSamples(
    long  val
);

Remarks

Min: 0

Default: 0

Max: RecordSize

See Also

Reference

IAgM9216ChannelTrigger Interface
Agilent.AgM9216.Interop Namespace


Slope Property

[image]

AgM9216 IVI Driver Reference Agilent Technologies
IAgM9216ChannelTrigger..::.Slope Property
IAgM9216ChannelTrigger See Also

Specifies trigger slope for the input port as either rising edge, falling edge ,both edges or DC level.Valid values are AgM9216TriggerSlopePositive , AgM9216TriggerSlopeNegative and AgM9216TriggerSlopeBoth, AgM9216TriggerSlopeLevel .This setting is ignored if TriggerMode is AgM9216TriggerModeImmediate.

Namespace: Agilent.AgM9216.Interop
Assembly: Agilent.AgM9216.Interop (in Agilent.AgM9216.Interop.dll)

Syntax

Visual Basic
Public Property Slope As AgM9216TriggerSlopeEnum
C#
public AgM9216TriggerSlopeEnum  Slope { get; set; }
Visual C++
HRESULT get_Slope(
    AgM9216TriggerSlopeEnum*  val
);
HRESULT put_Slope(
    AgM9216TriggerSlopeEnum  val
);

See Also

Reference

IAgM9216ChannelTrigger Interface
Agilent.AgM9216.Interop Namespace


TimeOut Property

[image]

AgM9216 IVI Driver Reference Agilent Technologies
IAgM9216ChannelTrigger..::.TimeOut Property
IAgM9216ChannelTrigger See Also

Specifies the maximum allowable time for the channel to detect a valid trigger condition as specified by the configuration parameters. If the trigger condition is not met, a AgM9216AcquisitionStatusTimeOut is returned as acquisition status.The units are set in multiples of one microsecond.This setting is ignored if TriggerMode is AgM9216TriggerModeImmediate.

Namespace: Agilent.AgM9216.Interop
Assembly: Agilent.AgM9216.Interop (in Agilent.AgM9216.Interop.dll)

Syntax

Visual Basic
Public Property TimeOut As Integer
C#
public int  TimeOut { get; set; }
Visual C++
HRESULT get_TimeOut(
    long*  val
);
HRESULT put_TimeOut(
    long  val
);

Remarks

Min: 0

Default: 1000000 (1 s)

Max: 16000000 (16 s)

A zero setting will cause the channel to timeout immediately, and no measurement will be made on that channel. Note that when the M9216 is in AgM9216MeasurementModeMultiple mode , the longest TimeOut setting of all the eight channels will determine the maximum period WaitForAcquisitionToComplete waits before returning.

See Also

Reference

IAgM9216ChannelTrigger Interface
Agilent.AgM9216.Interop Namespace


Name Property

[image]

AgM9216 IVI Driver Reference Agilent Technologies
IAgM9216Channels..::.Name Property
IAgM9216Channels See Also

-- READ ONLY -- Channels Item uniquely identifies the channel in the channels collection. It returns a pointer to the IAgM9216Channel interface.

Namespace: Agilent.AgM9216.Interop
Assembly: Agilent.AgM9216.Interop (in Agilent.AgM9216.Interop.dll)

Syntax

Visual Basic
Public ReadOnly Property Name( _
    ByVal  Index As Integer  _
) As String
C#
public string  get_Name(
    int  Index
)
Visual C++
HRESULT get_Name(
    long  Index,
    BSTR*  val
);

Parameters

Index

Channels index. For Group Channel Mode, valid range is 1 to 8. In Single Channel Mode only 1 is valid.

Remarks

In single channel mode, there is only one channel while in Multiple channel mode, there are eight available channels 1 to 8. Get the name using the Channels Name property.

See Also

Reference

IAgM9216Channels Interface
Agilent.AgM9216.Interop Namespace


Close Method

[image]

AgM9216 IVI Driver Reference Agilent Technologies
IIviDriver..::.Close Method
IIviDriver See Also

Closes the I/O session to the instrument. Driver methods and properties that access the instrument are not accessible after Close is called.

Namespace: Ivi.Driver.Interop
Assembly: Ivi.Driver.Interop (in Ivi.Driver.Interop.DLL)

Syntax

Visual Basic
Public Sub Close ( _
)
C#
public void  Close(
)
Visual C++
HRESULT Close(
);

See Also

Reference

IIviDriver Interface
Ivi.Driver.Interop Namespace


DriverOperation Property

[image]

AgM9216 IVI Driver Reference Agilent Technologies
IIviDriver..::.DriverOperation Property
IIviDriver See Also

Pointer to the IIviDriverOperation interface

Namespace: Ivi.Driver.Interop
Assembly: Ivi.Driver.Interop (in Ivi.Driver.Interop.DLL)

Syntax

Visual Basic
Public ReadOnly Property DriverOperation As IIviDriverOperation
C#
public IIviDriverOperation  DriverOperation { get; }
Visual C++
HRESULT get_DriverOperation(
    IIviDriverOperation**  val
);

See Also

Reference

IIviDriver Interface
Ivi.Driver.Interop Namespace


Cache Property

[image]

AgM9216 IVI Driver Reference Agilent Technologies
IIviDriverOperation..::.Cache Property
IIviDriverOperation See Also

Drivers may choose to always cache some instrument settings, never cache others, and optionally cache others, to avoid unecessary I/O to the instrument. If True, the driver caches optionally cached instrument settings.

Namespace: Ivi.Driver.Interop
Assembly: Ivi.Driver.Interop (in Ivi.Driver.Interop.DLL)

Syntax

Visual Basic
Public Property Cache As Boolean
C#
public bool  Cache { get; set; }
Visual C++
HRESULT get_Cache(
    VARIANT_BOOL*  val
);
HRESULT put_Cache(
    VARIANT_BOOL  val
);

See Also

Reference

IIviDriverOperation Interface
Ivi.Driver.Interop Namespace


ClearInterchangeWarnings Method

[image]

AgM9216 IVI Driver Reference Agilent Technologies
IIviDriverOperation..::.ClearInterchangeWarnings Method
IIviDriverOperation See Also

Clears the list of interchangeability warnings that the IVI specific driver maintains.

Namespace: Ivi.Driver.Interop
Assembly: Ivi.Driver.Interop (in Ivi.Driver.Interop.DLL)

Syntax

Visual Basic
Public Sub ClearInterchangeWarnings ( _
)
C#
public void  ClearInterchangeWarnings(
)
Visual C++
HRESULT ClearInterchangeWarnings(
);

See Also

Reference

IIviDriverOperation Interface
Ivi.Driver.Interop Namespace


DriverSetup Property

[image]

AgM9216 IVI Driver Reference Agilent Technologies
IIviDriverOperation..::.DriverSetup Property
IIviDriverOperation See Also

The driver setup string. It is either specified in the Configuration Store or passed in the OptionString parameter of the Initialize function. Driver setup is empty if the driver is not initialized.

Namespace: Ivi.Driver.Interop
Assembly: Ivi.Driver.Interop (in Ivi.Driver.Interop.DLL)

Syntax

Visual Basic
Public ReadOnly Property DriverSetup As String
C#
public string  DriverSetup { get; }
Visual C++
HRESULT get_DriverSetup(
    BSTR*  val
);

See Also

Reference

IIviDriverOperation Interface
Ivi.Driver.Interop Namespace


GetNextCoercionRecord Method

[image]

AgM9216 IVI Driver Reference Agilent Technologies
IIviDriverOperation..::.GetNextCoercionRecord Method
IIviDriverOperation See Also

Returns the oldest record from the coercion record list. Records are only added to the list if RecordCoercions is True.

Namespace: Ivi.Driver.Interop
Assembly: Ivi.Driver.Interop (in Ivi.Driver.Interop.DLL)

Syntax

Visual Basic
Public Function GetNextCoercionRecord ( _
) As String
C#
public string  GetNextCoercionRecord(
)
Visual C++
HRESULT GetNextCoercionRecord(
    BSTR*  retval
);

Return Value

The coercion record string shall contain the following information: (1) The name of the attribute that was coerced. This can be the generic name, the COM property name, or the C defined constant. (2) If the attribute is channel-based, the name of the channel. The channel name can be the specific driver channel string or the virtual channel name that the user specified.(3) If the attribute applies to a repeated capability, the name of the repeated capability. The name can be the specific driver repeated capability token or the virtual repeated capability name that the user specified.(4) The value that the user specified for the attribute.(5) The value to which the attribute was coerced.

See Also

Reference

IIviDriverOperation Interface
Ivi.Driver.Interop Namespace


GetNextInterchangeWarning Method

[image]

AgM9216 IVI Driver Reference Agilent Technologies
IIviDriverOperation..::.GetNextInterchangeWarning Method
IIviDriverOperation See Also

Returns the oldest warning from the interchange warning list. Records are only added to the list if InterchangeCheck is True.

Namespace: Ivi.Driver.Interop
Assembly: Ivi.Driver.Interop (in Ivi.Driver.Interop.DLL)

Syntax

Visual Basic
Public Function GetNextInterchangeWarning ( _
) As String
C#
public string  GetNextInterchangeWarning(
)
Visual C++
HRESULT GetNextInterchangeWarning(
    BSTR*  retval
);

Return Value

A string describing the oldest interchangeability warning or empty string if no warrnings remain.

See Also

Reference

IIviDriverOperation Interface
Ivi.Driver.Interop Namespace


InterchangeCheck Property

[image]

AgM9216 IVI Driver Reference Agilent Technologies
IIviDriverOperation..::.InterchangeCheck Property
IIviDriverOperation See Also

If True, the driver maintains a record of interchangeability warnings. If the driver does not support interchangeability checking, attempts to set InterchangeCheck to True return an error.

Namespace: Ivi.Driver.Interop
Assembly: Ivi.Driver.Interop (in Ivi.Driver.Interop.DLL)

Syntax

Visual Basic
Public Property InterchangeCheck As Boolean
C#
public bool  InterchangeCheck { get; set; }
Visual C++
HRESULT get_InterchangeCheck(
    VARIANT_BOOL*  val
);
HRESULT put_InterchangeCheck(
    VARIANT_BOOL  val
);

See Also

Reference

IIviDriverOperation Interface
Ivi.Driver.Interop Namespace


InvalidateAllAttributes Method

[image]

AgM9216 IVI Driver Reference Agilent Technologies
IIviDriverOperation..::.InvalidateAllAttributes Method
IIviDriverOperation See Also

Invalidates all of the driver's cached values.

Namespace: Ivi.Driver.Interop
Assembly: Ivi.Driver.Interop (in Ivi.Driver.Interop.DLL)

Syntax

Visual Basic
Public Sub InvalidateAllAttributes ( _
)
C#
public void  InvalidateAllAttributes(
)
Visual C++
HRESULT InvalidateAllAttributes(
);

See Also

Reference

IIviDriverOperation Interface
Ivi.Driver.Interop Namespace


IoResourceDescriptor Property

[image]

AgM9216 IVI Driver Reference Agilent Technologies
IIviDriverOperation..::.IoResourceDescriptor Property
IIviDriverOperation See Also

The resource descriptor specifies the connection to a physical device. It is either specified in the Configuration Store or passed in the ResourceName parameter of the Initialize function. It is empty if the driver is not initialized.

Namespace: Ivi.Driver.Interop
Assembly: Ivi.Driver.Interop (in Ivi.Driver.Interop.DLL)

Syntax

Visual Basic
Public ReadOnly Property IoResourceDescriptor As String
C#
public string  IoResourceDescriptor { get; }
Visual C++
HRESULT get_IoResourceDescriptor(
    BSTR*  val
);

See Also

Reference

IIviDriverOperation Interface
Ivi.Driver.Interop Namespace


LogicalName Property

[image]

AgM9216 IVI Driver Reference Agilent Technologies
IIviDriverOperation..::.LogicalName Property
IIviDriverOperation See Also

Logical Name identifies a driver session in the Configuration Store. If Logical Name is not empty, the driver was initialized from information in the driver session. If it is empty, the driver was initialized without using the Configuration Store.

Namespace: Ivi.Driver.Interop
Assembly: Ivi.Driver.Interop (in Ivi.Driver.Interop.DLL)

Syntax

Visual Basic
Public ReadOnly Property LogicalName As String
C#
public string  LogicalName { get; }
Visual C++
HRESULT get_LogicalName(
    BSTR*  val
);

See Also

Reference

IIviDriverOperation Interface
Ivi.Driver.Interop Namespace


QueryInstrumentStatus Property

[image]

AgM9216 IVI Driver Reference Agilent Technologies
IIviDriverOperation..::.QueryInstrumentStatus Property
IIviDriverOperation See Also

If True, the driver queries the instrument status at the end of each method or property that performs I/O to the instrument. If an error is reported, use ErrorQuery to retrieve error messages one at a time from the instrument.

Namespace: Ivi.Driver.Interop
Assembly: Ivi.Driver.Interop (in Ivi.Driver.Interop.DLL)

Syntax

Visual Basic
Public Property QueryInstrumentStatus As Boolean
C#
public bool  QueryInstrumentStatus { get; set; }
Visual C++
HRESULT get_QueryInstrumentStatus(
    VARIANT_BOOL*  val
);
HRESULT put_QueryInstrumentStatus(
    VARIANT_BOOL  val
);

See Also

Reference

IIviDriverOperation Interface
Ivi.Driver.Interop Namespace


RangeCheck Property

[image]

AgM9216 IVI Driver Reference Agilent Technologies
IIviDriverOperation..::.RangeCheck Property
IIviDriverOperation See Also

Drivers may choose to always validate some property/parameter values, never validate others, and optionally validate others, to avoid sending invalid commands to the instrument. If True, the driver performs optional validations.

Namespace: Ivi.Driver.Interop
Assembly: Ivi.Driver.Interop (in Ivi.Driver.Interop.DLL)

Syntax

Visual Basic
Public Property RangeCheck As Boolean
C#
public bool  RangeCheck { get; set; }
Visual C++
HRESULT get_RangeCheck(
    VARIANT_BOOL*  val
);
HRESULT put_RangeCheck(
    VARIANT_BOOL  val
);

See Also

Reference

IIviDriverOperation Interface
Ivi.Driver.Interop Namespace


RecordCoercions Property

[image]

AgM9216 IVI Driver Reference Agilent Technologies
IIviDriverOperation..::.RecordCoercions Property
IIviDriverOperation See Also

If True, the driver keeps a list of the value coercions it makes for ViInt32 and ViReal64 attributes. If the driver does not support coercion recording, attempts to set RecordCoercions to True will return an error.

Namespace: Ivi.Driver.Interop
Assembly: Ivi.Driver.Interop (in Ivi.Driver.Interop.DLL)

Syntax

Visual Basic
Public Property RecordCoercions As Boolean
C#
public bool  RecordCoercions { get; set; }
Visual C++
HRESULT get_RecordCoercions(
    VARIANT_BOOL*  val
);
HRESULT put_RecordCoercions(
    VARIANT_BOOL  val
);

See Also

Reference

IIviDriverOperation Interface
Ivi.Driver.Interop Namespace


ResetInterchangeCheck Method

[image]

AgM9216 IVI Driver Reference Agilent Technologies
IIviDriverOperation..::.ResetInterchangeCheck Method
IIviDriverOperation See Also

Resets the interchangeability checking algorithms of the driver so that methods and properties that executed prior to calling this function have no affect on whether future calls to the driver generate interchangeability warnings.

Namespace: Ivi.Driver.Interop
Assembly: Ivi.Driver.Interop (in Ivi.Driver.Interop.DLL)

Syntax

Visual Basic
Public Sub ResetInterchangeCheck ( _
)
C#
public void  ResetInterchangeCheck(
)
Visual C++
HRESULT ResetInterchangeCheck(
);

See Also

Reference

IIviDriverOperation Interface
Ivi.Driver.Interop Namespace


Simulate Property

[image]

AgM9216 IVI Driver Reference Agilent Technologies
IIviDriverOperation..::.Simulate Property
IIviDriverOperation See Also

If True, the driver does not perform I/O to the instrument, and returns simulated values for output parameters.

Namespace: Ivi.Driver.Interop
Assembly: Ivi.Driver.Interop (in Ivi.Driver.Interop.DLL)

Syntax

Visual Basic
Public Property Simulate As Boolean
C#
public bool  Simulate { get; set; }
Visual C++
HRESULT get_Simulate(
    VARIANT_BOOL*  val
);
HRESULT put_Simulate(
    VARIANT_BOOL  val
);

See Also

Reference

IIviDriverOperation Interface
Ivi.Driver.Interop Namespace


Identity Property

[image]

AgM9216 IVI Driver Reference Agilent Technologies
IIviDriver..::.Identity Property
IIviDriver See Also

Pointer to the IIviDriverIdentity interface

Namespace: Ivi.Driver.Interop
Assembly: Ivi.Driver.Interop (in Ivi.Driver.Interop.DLL)

Syntax

Visual Basic
Public ReadOnly Property Identity As IIviDriverIdentity
C#
public IIviDriverIdentity  Identity { get; }
Visual C++
HRESULT get_Identity(
    IIviDriverIdentity**  val
);

See Also

Reference

IIviDriver Interface
Ivi.Driver.Interop Namespace


Description Property

[image]

AgM9216 IVI Driver Reference Agilent Technologies
IIviComponentIdentity..::.Description Property
IIviComponentIdentity See Also

A brief description of the implementing component. Description is limted to 256 bytes.

Namespace: Ivi.Driver.Interop
Assembly: Ivi.Driver.Interop (in Ivi.Driver.Interop.DLL)

Syntax

Visual Basic
Public ReadOnly Property Description As String
C#
public string  Description { get; }
Visual C++
HRESULT get_Description(
    BSTR*  val
);

See Also

Reference

IIviComponentIdentity Interface
Ivi.Driver.Interop Namespace


GroupCapabilities Property

[image]

AgM9216 IVI Driver Reference Agilent Technologies
IIviDriverIdentity..::.GroupCapabilities Property
IIviDriverIdentity See Also

A comma-separated list of the class capability groups implemented by the driver. Capability group names are documented in the IVI class specifications. If the driver is not class compliant, the driver returns an empty string.

Namespace: Ivi.Driver.Interop
Assembly: Ivi.Driver.Interop (in Ivi.Driver.Interop.DLL)

Syntax

Visual Basic
Public ReadOnly Property GroupCapabilities As String
C#
public string  GroupCapabilities { get; }
Visual C++
HRESULT get_GroupCapabilities(
    BSTR*  val
);

See Also

Reference

IIviDriverIdentity Interface
Ivi.Driver.Interop Namespace


Identifier Property

[image]

AgM9216 IVI Driver Reference Agilent Technologies
IIviDriverIdentity..::.Identifier Property
IIviDriverIdentity See Also

The case-sensitive unique identifier of the implementing IVI-COM instrument driver.

Namespace: Ivi.Driver.Interop
Assembly: Ivi.Driver.Interop (in Ivi.Driver.Interop.DLL)

Syntax

Visual Basic
Public ReadOnly Property Identifier As String
C#
public string  Identifier { get; }
Visual C++
HRESULT get_Identifier(
    BSTR*  val
);

See Also

Reference

IIviDriverIdentity Interface
Ivi.Driver.Interop Namespace


InstrumentFirmwareRevision Property

[image]

AgM9216 IVI Driver Reference Agilent Technologies
IIviDriverIdentity..::.InstrumentFirmwareRevision Property
IIviDriverIdentity See Also

The firmware revision reported by the physical instrument. If Simulation is enabled or the instrument is not capable of reporting the firmware revision, a string is returned that explains the condition.

Namespace: Ivi.Driver.Interop
Assembly: Ivi.Driver.Interop (in Ivi.Driver.Interop.DLL)

Syntax

Visual Basic
Public ReadOnly Property InstrumentFirmwareRevision As String
C#
public string  InstrumentFirmwareRevision { get; }
Visual C++
HRESULT get_InstrumentFirmwareRevision(
    BSTR*  val
);

See Also

Reference

IIviDriverIdentity Interface
Ivi.Driver.Interop Namespace


InstrumentManufacturer Property

[image]

AgM9216 IVI Driver Reference Agilent Technologies
IIviDriverIdentity..::.InstrumentManufacturer Property
IIviDriverIdentity See Also

The name of the manufacturer reported by the physical instrument. If Simulation is enabled or the instrument is not capable of reporting the name of the manufacturer, a string is returned that explains the condition. Manufacturer is limited to 256 bytes

Namespace: Ivi.Driver.Interop
Assembly: Ivi.Driver.Interop (in Ivi.Driver.Interop.DLL)

Syntax

Visual Basic
Public ReadOnly Property InstrumentManufacturer As String
C#
public string  InstrumentManufacturer { get; }
Visual C++
HRESULT get_InstrumentManufacturer(
    BSTR*  val
);

See Also

Reference

IIviDriverIdentity Interface
Ivi.Driver.Interop Namespace


InstrumentModel Property

[image]

AgM9216 IVI Driver Reference Agilent Technologies
IIviDriverIdentity..::.InstrumentModel Property
IIviDriverIdentity See Also

The model number or name reported by the physical instrument. If Simulation is enabled or the instrument is not capable of reporting the model number or name, a string is returned that explains the condition. Model is limited to 256 bytes

Namespace: Ivi.Driver.Interop
Assembly: Ivi.Driver.Interop (in Ivi.Driver.Interop.DLL)

Syntax

Visual Basic
Public ReadOnly Property InstrumentModel As String
C#
public string  InstrumentModel { get; }
Visual C++
HRESULT get_InstrumentModel(
    BSTR*  val
);

See Also

Reference

IIviDriverIdentity Interface
Ivi.Driver.Interop Namespace


Revision Property

[image]

AgM9216 IVI Driver Reference Agilent Technologies
IIviComponentIdentity..::.Revision Property
IIviComponentIdentity See Also

The revision of the implementing component. Refer to IVI 3.1, Section 3.1.2.2, for a description of revision syntax and semantics. Revision is limited to 256 bytes.

Namespace: Ivi.Driver.Interop
Assembly: Ivi.Driver.Interop (in Ivi.Driver.Interop.DLL)

Syntax

Visual Basic
Public ReadOnly Property Revision As String
C#
public string  Revision { get; }
Visual C++
HRESULT get_Revision(
    BSTR*  val
);

See Also

Reference

IIviComponentIdentity Interface
Ivi.Driver.Interop Namespace


SpecificationMajorVersion Property

[image]

AgM9216 IVI Driver Reference Agilent Technologies
IIviDriverIdentity..::.SpecificationMajorVersion Property
IIviDriverIdentity See Also

For IVI class-compliant drivers, the major version number of the instrument class specification. If the driver is not class compliant, the driver returns zero.

Namespace: Ivi.Driver.Interop
Assembly: Ivi.Driver.Interop (in Ivi.Driver.Interop.DLL)

Syntax

Visual Basic
Public ReadOnly Property SpecificationMajorVersion As Integer
C#
public int  SpecificationMajorVersion { get; }
Visual C++
HRESULT get_SpecificationMajorVersion(
    long*  val
);

See Also

Reference

IIviDriverIdentity Interface
Ivi.Driver.Interop Namespace


SpecificationMinorVersion Property

[image]

AgM9216 IVI Driver Reference Agilent Technologies
IIviDriverIdentity..::.SpecificationMinorVersion Property
IIviDriverIdentity See Also

For IVI class-compliant drivers, the minor version number of the instrument class specification. If the driver is not class compliant, the driver returns zero.

Namespace: Ivi.Driver.Interop
Assembly: Ivi.Driver.Interop (in Ivi.Driver.Interop.DLL)

Syntax

Visual Basic
Public ReadOnly Property SpecificationMinorVersion As Integer
C#
public int  SpecificationMinorVersion { get; }
Visual C++
HRESULT get_SpecificationMinorVersion(
    long*  val
);

See Also

Reference

IIviDriverIdentity Interface
Ivi.Driver.Interop Namespace


SupportedInstrumentModels Property

[image]

AgM9216 IVI Driver Reference Agilent Technologies
IIviDriverIdentity..::.SupportedInstrumentModels Property
IIviDriverIdentity See Also

A comma-separated list of instrument models that the IVI specific driver can control. The string does not include an abbreviation for the manufacturer if it is the same for all models.

Namespace: Ivi.Driver.Interop
Assembly: Ivi.Driver.Interop (in Ivi.Driver.Interop.DLL)

Syntax

Visual Basic
Public ReadOnly Property SupportedInstrumentModels As String
C#
public string  SupportedInstrumentModels { get; }
Visual C++
HRESULT get_SupportedInstrumentModels(
    BSTR*  val
);

See Also

Reference

IIviDriverIdentity Interface
Ivi.Driver.Interop Namespace


Vendor Property

[image]

AgM9216 IVI Driver Reference Agilent Technologies
IIviComponentIdentity..::.Vendor Property
IIviComponentIdentity See Also

The name of the vendor that supplies the implementing component. Vendor is limited to 256 bytes.

Namespace: Ivi.Driver.Interop
Assembly: Ivi.Driver.Interop (in Ivi.Driver.Interop.DLL)

Syntax

Visual Basic
Public ReadOnly Property Vendor As String
C#
public string  Vendor { get; }
Visual C++
HRESULT get_Vendor(
    BSTR*  val
);

See Also

Reference

IIviComponentIdentity Interface
Ivi.Driver.Interop Namespace


Initialize Method

[image]

AgM9216 IVI Driver Reference Agilent Technologies
IIviDriver..::.Initialize Method
IIviDriver See Also

Opens the I/O session to the instrument. Driver methods and properties that access the instrument are only accessible after Initialize is called. Initialize optionally performs a Reset and queries the instrument to validate the instrument model.

Namespace: Ivi.Driver.Interop
Assembly: Ivi.Driver.Interop (in Ivi.Driver.Interop.DLL)

Syntax

Visual Basic
Public Sub Initialize ( _
    ByVal  ResourceName As String  _
    ByVal  IdQuery As Boolean  _
    ByVal  Reset As Boolean  _
    ByVal  OptionString As String  _
)
C#
public void  Initialize(
    string  ResourceName,
    bool  IdQuery,
    bool  Reset,
    string  OptionString
)
Visual C++
HRESULT Initialize(
    BSTR  ResourceName,
    VARIANT_BOOL  IdQuery,
    VARIANT_BOOL  Reset,
    BSTR  OptionString
);

Parameters

ResourceName

An IVI logical name or an instrument specific string that identifies the address of the instrument, such as a VISA resource descriptor string.

IdQuery

Specifies whether to verify the ID of the instrument.

Reset

Specifies whether to reset the instrument.

OptionString

The user can use the OptionsString parameter to specify the initial values of certain IVI inherent attributes for the session. The format of an assignment in the OptionsString parameteris "Name=Value", where Name is one of: RangeCheck, QuerytInstrStatus, Cache, Simulate, RecordCoercions, InterchangeCheck,or DriverSetup. Value is either true or false except for DriverSetup. If the Options String parameter contains an assignment for the Driver Setup attribute, the Initialize function assumes that everything following "DriverSetup=" is part of the assignment.

Remarks

For detailed parameter usage see: Initializing the IVI-COM Driver

See Also

Reference

IIviDriver Interface
Ivi.Driver.Interop Namespace


Initialized Property

[image]

AgM9216 IVI Driver Reference Agilent Technologies
IIviDriver..::.Initialized Property
IIviDriver See Also

Initialized is True between a successful call to the Initialize method and a successful call to the Close method, and False at all other times.

Namespace: Ivi.Driver.Interop
Assembly: Ivi.Driver.Interop (in Ivi.Driver.Interop.DLL)

Syntax

Visual Basic
Public ReadOnly Property Initialized As Boolean
C#
public bool  Initialized { get; }
Visual C++
HRESULT get_Initialized(
    VARIANT_BOOL*  val
);

Remarks

In the Single Channel mode, the M9216A will utilize all the hardware's acquisition memory for a single channel. This allows a maximum of 240000 samples RecordSize. However user are only allowed to use one channel at a time. Use this mode only when a large RecordSize is required.

See Also

Reference

IIviDriver Interface
Ivi.Driver.Interop Namespace


MeasurementMode Property

[image]

AgM9216 IVI Driver Reference Agilent Technologies
IAgM9216..::.MeasurementMode Property
IAgM9216 See Also

This property determines whether the M9216A is set in Single channel or Multiple Channel personality. When this property is changed, the device's configuration properties will be reinitialized to the default settings. InputConnector for all channels will be set to 1. An update hardware command will also be sent to the hardware.

Namespace: Agilent.AgM9216.Interop
Assembly: Agilent.AgM9216.Interop (in Agilent.AgM9216.Interop.dll)

Syntax

Visual Basic
Public Property MeasurementMode As AgM9216MeasurementModeEnum
C#
public AgM9216MeasurementModeEnum  MeasurementMode { get; set; }
Visual C++
HRESULT get_MeasurementMode(
    AgM9216MeasurementModeEnum*  val
);
HRESULT put_MeasurementMode(
    AgM9216MeasurementModeEnum  val
);

Remarks

In the Single Channel mode, the M9216A will utilize all the hardware's acquisition memory for a single channel. This allows a maximum of 240000 samples RecordSize. However user are only allowed to use one channel at a time. Use this mode only when a large RecordSize is required.

See Also

Reference

IAgM9216 Interface
Agilent.AgM9216.Interop Namespace


System Property

[image]

AgM9216 IVI Driver Reference Agilent Technologies
IAgM9216..::.System Property
IAgM9216 See Also

Pointer to the IAgM9216System interface.

Namespace: Agilent.AgM9216.Interop
Assembly: Agilent.AgM9216.Interop (in Agilent.AgM9216.Interop.dll)

Syntax

Visual Basic
Public ReadOnly Property System As IAgM9216System
C#
public IAgM9216System  System { get; }
Visual C++
HRESULT get_System(
    IAgM9216System**  val
);

See Also

Reference

IAgM9216 Interface
Agilent.AgM9216.Interop Namespace


BoardRevision Property

[image]

AgM9216 IVI Driver Reference Agilent Technologies
IAgM9216System..::.BoardRevision Property
IAgM9216System See Also

-- READ ONLY -- Returns the PCB version.

Namespace: Agilent.AgM9216.Interop
Assembly: Agilent.AgM9216.Interop (in Agilent.AgM9216.Interop.dll)

Syntax

Visual Basic
Public ReadOnly Property BoardRevision As String
C#
public string  BoardRevision { get; }
Visual C++
HRESULT get_BoardRevision(
    BSTR*  val
);

Remarks

You may also enable tracing and specify additional options when initializing the driver. See 'Driver Setup' options on the Initializing the IVI-COM Driver page for more details.

See Also

Reference

IAgM9216System Interface
Agilent.AgM9216.Interop Namespace


CalibationDate Property

[image]

AgM9216 IVI Driver Reference Agilent Technologies
IAgM9216System..::.CalibationDate Property
IAgM9216System See Also

-- READ ONLY -- Returns the Calibration Date from EEPROM.

Namespace: Agilent.AgM9216.Interop
Assembly: Agilent.AgM9216.Interop (in Agilent.AgM9216.Interop.dll)

Syntax

Visual Basic
Public ReadOnly Property CalibationDate As String
C#
public string  CalibationDate { get; }
Visual C++
HRESULT get_CalibationDate(
    BSTR*  val
);

See Also

Reference

IAgM9216System Interface
Agilent.AgM9216.Interop Namespace


DriverRevision Property

[image]

AgM9216 IVI Driver Reference Agilent Technologies
IAgM9216System..::.DriverRevision Property
IAgM9216System See Also

-- READ ONLY -- Returns the fundamental driver revision.

Namespace: Agilent.AgM9216.Interop
Assembly: Agilent.AgM9216.Interop (in Agilent.AgM9216.Interop.dll)

Syntax

Visual Basic
Public ReadOnly Property DriverRevision As String
C#
public string  DriverRevision { get; }
Visual C++
HRESULT get_DriverRevision(
    BSTR*  val
);

See Also

Reference

IAgM9216System Interface
Agilent.AgM9216.Interop Namespace


FPGARevision Property

[image]

AgM9216 IVI Driver Reference Agilent Technologies
IAgM9216System..::.FPGARevision Property
IAgM9216System See Also

-- READ ONLY -- Returns the FPGA firmware version.

Namespace: Agilent.AgM9216.Interop
Assembly: Agilent.AgM9216.Interop (in Agilent.AgM9216.Interop.dll)

Syntax

Visual Basic
Public ReadOnly Property FPGARevision As String
C#
public string  FPGARevision { get; }
Visual C++
HRESULT get_FPGARevision(
    BSTR*  val
);

See Also

Reference

IAgM9216System Interface
Agilent.AgM9216.Interop Namespace


SerialNumber Property

[image]

AgM9216 IVI Driver Reference Agilent Technologies
IAgM9216System..::.SerialNumber Property
IAgM9216System See Also

-- READ ONLY -- Returns the serial number of the module.

Namespace: Agilent.AgM9216.Interop
Assembly: Agilent.AgM9216.Interop (in Agilent.AgM9216.Interop.dll)

Syntax

Visual Basic
Public ReadOnly Property SerialNumber As String
C#
public string  SerialNumber { get; }
Visual C++
HRESULT get_SerialNumber(
    BSTR*  val
);

See Also

Reference

IAgM9216System Interface
Agilent.AgM9216.Interop Namespace


SlotNumber Property

[image]

AgM9216 IVI Driver Reference Agilent Technologies
IAgM9216System..::.SlotNumber Property
IAgM9216System See Also

-- READ ONLY -- Returns the the slot number of the card.

Namespace: Agilent.AgM9216.Interop
Assembly: Agilent.AgM9216.Interop (in Agilent.AgM9216.Interop.dll)

Syntax

Visual Basic
Public ReadOnly Property SlotNumber As Integer
C#
public int  SlotNumber { get; }
Visual C++
HRESULT get_SlotNumber(
    long*  val
);

See Also

Reference

IAgM9216System Interface
Agilent.AgM9216.Interop Namespace


TraceEnabled Property

[image]

AgM9216 IVI Driver Reference Agilent Technologies
IAgM9216System..::.TraceEnabled Property
IAgM9216System See Also

If true, output trace log of all driver calls to an XML file using a unique file name based on date and time in the same directory as the application executable accessing the driver OR as specified using tracing options when initializing the driver. See remarks below for tracing options information. The log file may be viewed in your web browser. If enabled, driver trace and additional IO events may also be viewed in the IO Monitor utility of Agilent IO Libraries 16.0 or newer.

Namespace: Agilent.AgM9216.Interop
Assembly: Agilent.AgM9216.Interop (in Agilent.AgM9216.Interop.dll)

Syntax

Visual Basic
Public Property TraceEnabled As Boolean
C#
public bool  TraceEnabled { get; set; }
Visual C++
HRESULT get_TraceEnabled(
    VARIANT_BOOL*  val
);
HRESULT put_TraceEnabled(
    VARIANT_BOOL  val
);

Remarks

You may also enable tracing, specify a file name and path, and additional trace options when initializing the driver. For complete information on Initialize tracing options see the 'DriverSetup' section on the Initializing the IVI-COM Driver page.

See Also

Reference

IAgM9216System Interface
Agilent.AgM9216.Interop Namespace


TriggerMode Property

[image]

AgM9216 IVI Driver Reference Agilent Technologies
IAgM9216..::.TriggerMode Property
IAgM9216 See Also

This property sets whether the M9216A channels uses the trigger level settings to perform the measurement, or to instead acquire data immediately upon receiving the Initiate command.

Namespace: Agilent.AgM9216.Interop
Assembly: Agilent.AgM9216.Interop (in Agilent.AgM9216.Interop.dll)

Syntax

Visual Basic
Public Property TriggerMode As AgM9216TriggerModeEnum
C#
public AgM9216TriggerModeEnum  TriggerMode { get; set; }
Visual C++
HRESULT get_TriggerMode(
    AgM9216TriggerModeEnum*  val
);
HRESULT put_TriggerMode(
    AgM9216TriggerModeEnum  val
);

Remarks

This property is a global setting and affects every channel of the M9216A. Changing Trigger Mode does NOT cause a hardware reset to be issued.

See Also

Reference

IAgM9216 Interface
Agilent.AgM9216.Interop Namespace


UpdateHardware Method

[image]

AgM9216 IVI Driver Reference Agilent Technologies
IAgM9216..::.UpdateHardware Method
IAgM9216 See Also

Loads the digitizer configuration and connector selection into the hardware. All changes to configuration settings and connector selection are cached in the host driver until this command is called. This command effectively synchronizes the host driver and hardware.

Namespace: Agilent.AgM9216.Interop
Assembly: Agilent.AgM9216.Interop (in Agilent.AgM9216.Interop.dll)

Syntax

Visual Basic
Public Sub UpdateHardware ( _
)
C#
public void  UpdateHardware(
)
Visual C++
HRESULT UpdateHardware(
);

Remarks

Only the lastest property value for each channel will be effected into hardware since the driver stores only the last change. For example the following code snippet below will result in connector 1 of channel 1 being selected for acquisition.

[psuedo code]

spDriver->Acquisition->Channels->Item("Channel1")->InputConnectorSelection=2;

spDriver->Acquisition->Channels->Item("Channel1")->InputConnectorSelection=1;

spDriver->UpdateHardware();

Allow a 1ms settling time for relay debouncing if inputPort(s) for each channel have been changed before Initiating Acquisition.

See Also

Reference

IAgM9216 Interface
Agilent.AgM9216.Interop Namespace


Utility Property

[image]

AgM9216 IVI Driver Reference Agilent Technologies
IIviDriver..::.Utility Property
IIviDriver See Also

Pointer to the IIviDriverUtility interface

Namespace: Ivi.Driver.Interop
Assembly: Ivi.Driver.Interop (in Ivi.Driver.Interop.DLL)

Syntax

Visual Basic
Public ReadOnly Property Utility As IIviDriverUtility
C#
public IIviDriverUtility  Utility { get; }
Visual C++
HRESULT get_Utility(
    IIviDriverUtility**  val
);

See Also

Reference

IIviDriver Interface
Ivi.Driver.Interop Namespace


Disable Method

[image]

AgM9216 IVI Driver Reference Agilent Technologies
IIviDriverUtility..::.Disable Method
IIviDriverUtility See Also

--NOT SUPPORTED-- Quickly places the instrument in a state where it has no, or minimal, effect on the external system to which it is connected. This state is not necessarily a known state.

Namespace: Ivi.Driver.Interop
Assembly: Ivi.Driver.Interop (in Ivi.Driver.Interop.DLL)

Syntax

Visual Basic
Public Sub Disable ( _
)
C#
public void  Disable(
)
Visual C++
HRESULT Disable(
);

See Also

Reference

IIviDriverUtility Interface
Ivi.Driver.Interop Namespace


ErrorQuery Method

[image]

AgM9216 IVI Driver Reference Agilent Technologies
IIviDriverUtility..::.ErrorQuery Method
IIviDriverUtility See Also

--NOT SUPPORTED-- Queries the instrument and returns instrument specific error information. This function can be used when QueryInstrumentStatus is True to retrieve error details when the driver detects an instrument error.

Namespace: Ivi.Driver.Interop
Assembly: Ivi.Driver.Interop (in Ivi.Driver.Interop.DLL)

Syntax

Visual Basic
Public Sub ErrorQuery ( _
    ByRef  ErrorCode As Integer  _
    ByRef  ErrorMessage As String  _
)
C#
public void  ErrorQuery(
    ref int  ErrorCode,
    ref string  ErrorMessage
)
Visual C++
HRESULT ErrorQuery(
    long*  ErrorCode,
    BSTR*  ErrorMessage
);

Parameters

ErrorCode

Instrument error code

ErrorMessage

Instrument error message

See Also

Reference

IIviDriverUtility Interface
Ivi.Driver.Interop Namespace


LockObject Method

[image]

AgM9216 IVI Driver Reference Agilent Technologies
IIviDriverUtility..::.LockObject Method
IIviDriverUtility See Also

Obtains a multithread lock on the driver after waiting until all other execution threads have released their locks on the instrument session.

Namespace: Ivi.Driver.Interop
Assembly: Ivi.Driver.Interop (in Ivi.Driver.Interop.DLL)

Syntax

Visual Basic
Public Sub LockObject ( _
)
C#
public void  LockObject(
)
Visual C++
HRESULT LockObject(
);

See Also

Reference

IIviDriverUtility Interface
Ivi.Driver.Interop Namespace


Reset Method

[image]

AgM9216 IVI Driver Reference Agilent Technologies
IIviDriverUtility..::.Reset Method
IIviDriverUtility See Also

Places the M9216 into a known state.

Namespace: Ivi.Driver.Interop
Assembly: Ivi.Driver.Interop (in Ivi.Driver.Interop.DLL)

Syntax

Visual Basic
Public Sub Reset ( _
)
C#
public void  Reset(
)
Visual C++
HRESULT Reset(
);

Remarks

Min: 0

Default: 1000000 (1 s)

Max: 16000000 (16 s)

A zero setting will cause the channel to timeout immediately, and no measurement will be made on that channel. Note that when the M9216 is in AgM9216MeasurementModeMultiple mode , the longest TimeOut setting of all the eight channels will determine the maximum period WaitForAcquisitionToComplete waits before returning.

See Also

Reference

IIviDriverUtility Interface
Ivi.Driver.Interop Namespace


ResetWithDefaults Method

[image]

AgM9216 IVI Driver Reference Agilent Technologies
IIviDriverUtility..::.ResetWithDefaults Method
IIviDriverUtility See Also

This function resets the M9216. All ports and properties will be set to the default values. A UpDateHardware command will be sent. This method needs to be called once when the M9216A is first started up.

Namespace: Ivi.Driver.Interop
Assembly: Ivi.Driver.Interop (in Ivi.Driver.Interop.DLL)

Syntax

Visual Basic
Public Sub ResetWithDefaults ( _
)
C#
public void  ResetWithDefaults(
)
Visual C++
HRESULT ResetWithDefaults(
);

See Also

Reference

IIviDriverUtility Interface
Ivi.Driver.Interop Namespace


SelfTest Method

[image]

AgM9216 IVI Driver Reference Agilent Technologies
IIviDriverUtility..::.SelfTest Method
IIviDriverUtility See Also

--NOT SUPPORTED-- Performs an instrument self test, waits for the instrument to complete the test, and queries the instrument for the results. If the instrument passes the test, TestResult is zero and TestMessage is 'Self test passed'.

Namespace: Ivi.Driver.Interop
Assembly: Ivi.Driver.Interop (in Ivi.Driver.Interop.DLL)

Syntax

Visual Basic
Public Sub SelfTest ( _
    ByRef  TestResult As Integer  _
    ByRef  TestMessage As String  _
)
C#
public void  SelfTest(
    ref int  TestResult,
    ref string  TestMessage
)
Visual C++
HRESULT SelfTest(
    long*  TestResult,
    BSTR*  TestMessage
);

Parameters

TestResult

The numeric result from the self test operation. 0 = no error (test passed)

TestMessage

The self test status message

See Also

Reference

IIviDriverUtility Interface
Ivi.Driver.Interop Namespace


UnlockObject Method

[image]

AgM9216 IVI Driver Reference Agilent Technologies
IIviDriverUtility..::.UnlockObject Method
IIviDriverUtility See Also

Releases a previously obtained mutlithread lock.

Namespace: Ivi.Driver.Interop
Assembly: Ivi.Driver.Interop (in Ivi.Driver.Interop.DLL)

Syntax

Visual Basic
Public Sub UnlockObject ( _
)
C#
public void  UnlockObject(
)
Visual C++
HRESULT UnlockObject(
);

See Also

Reference

IIviDriverUtility Interface
Ivi.Driver.Interop Namespace


IIviDriver Interface

[image]

AgM9216 IVI Driver Reference Agilent Technologies
IIviDriver Interface
See Also

IVI Driver root interface

Namespace: Ivi.Driver.Interop
Assembly: Ivi.Driver.Interop (in Ivi.Driver.Interop.DLL)

Syntax

Visual Basic
Public Interface IIviDriver
C#
public interface IIviDriver
Visual C++
__interface IIviDriver

Properties

 | Name | Description
Public property | DriverOperation | Pointer to the IIviDriverOperation interface
Public property | Identity | Pointer to the IIviDriverIdentity interface
Public property | Initialized | Initialized is True between a successful call to the Initialize method and a successful call to the Close method, and False at all other times.
Public property | Utility | Pointer to the IIviDriverUtility interface
Top

Methods

 | Name | Description
Public method | Close | Closes the I/O session to the instrument. Driver methods and properties that access the instrument are not accessible after Close is called.
Public method | Initialize | Opens the I/O session to the instrument. Driver methods and properties that access the instrument are only accessible after Initialize is called. Initialize optionally performs a Reset and queries the instrument to validate the instrument model.
Top

See Also

Reference

Ivi.Driver.Interop Namespace


IVI-COM Interfaces

[image]

AgM9216 IVI Driver Reference Agilent Technologies
IVI-COM Interfaces

Please click the Locate button to go to the Driver Interfaces node in the Contents panel. Use the Contents panel to navigate the driver interfaces.


Agilent.AgM9216.Interop Namespace

[image]

AgM9216 IVI Driver Reference Agilent Technologies
Agilent.AgM9216.Interop Namespace

IVI AgM9216 1.0 Type Library

Classes

 | Class | Description
Public class | AgM9216 |
Public class | AgM9216Channel |

Interfaces

 | Interface | Description
Public interface | IAgM9216 | IAgM9216 interface.
Public interface | IAgM9216Acquisition | IAgM9216Acquisition interface.
Public interface | IAgM9216Channel | IAgM9216Channel interface.
Public interface | IAgM9216ChannelMeasurement | IAgM9216ChannelsMeasurement interface.
Public interface | IAgM9216Channels | IAgM9216Channels interface.
Public interface | IAgM9216ChannelTrigger | IAgM9216ChannelTrigger interface.
Public interface | IAgM9216System | IAgM9216System interface.

Enumerations

 | Enumeration | Description
Public enumeration | AgM9216AcquisitionStatusEnum | Defined Acquition status ( 0: Idle, 1: Busy, 2: Completed, 3: Timeout).
Public enumeration | AgM9216ErrorCodesEnum |
Public enumeration | AgM9216MeasurementModeEnum | Defined Measurement mode (0 - Single channel, 1 - Multiple Channels)
Public enumeration | AgM9216MeasurementRangeSelectEnum | Defined fetch waveform data from the sub channels (0 - AgM9216DigitizerRangeSelectLow, 1 - Fetch only the wavefrom from 100V Range sub channel. 2 - AgM9216DigitizerRangeSelectBoth[Default], 3 - AgM9216DigitizerRangeSelectNone)
Public enumeration | AgM9216TriggerModeEnum | Defined available trigger mode(AgM9216TriggerModeChannel (default) or AgM9216TriggerModeImmediate)
Public enumeration | AgM9216TriggerSlopeEnum | Defined available slope( 0 - AgM9216TriggerSlopePositive (default), 1 - AgM9216TriggerSlopeNegative, 2 - AgM9216TriggerSlopeBoth, 3 - AgM9216TriggerSlopeLevel).


AgM9216 Class

[image]

AgM9216 IVI Driver Reference Agilent Technologies
AgM9216 Class
See Also

Namespace: Agilent.AgM9216.Interop
Assembly: Agilent.AgM9216.Interop (in Agilent.AgM9216.Interop.dll)

Syntax

Visual Basic
Public Class AgM9216
C#
public class AgM9216
Visual C++
class AgM9216

See Also

Reference

Agilent.AgM9216.Interop Namespace


AgM9216Channel Class

[image]

AgM9216 IVI Driver Reference Agilent Technologies
AgM9216Channel Class
See Also

Namespace: Agilent.AgM9216.Interop
Assembly: Agilent.AgM9216.Interop (in Agilent.AgM9216.Interop.dll)

Syntax

Visual Basic
Public Class AgM9216Channel
C#
public class AgM9216Channel
Visual C++
class AgM9216Channel

See Also

Reference

Agilent.AgM9216.Interop Namespace


IAgM9216Acquisition Interface

[image]

AgM9216 IVI Driver Reference Agilent Technologies
IAgM9216Acquisition Interface
See Also

IAgM9216Acquisition interface.

Namespace: Agilent.AgM9216.Interop
Assembly: Agilent.AgM9216.Interop (in Agilent.AgM9216.Interop.dll)

Syntax

Visual Basic
Public Interface IAgM9216Acquisition
C#
public interface IAgM9216Acquisition
Visual C++
__interface IAgM9216Acquisition

Methods

 | Name | Description
Public method | GetStatus | This function can be used to check the acquisition status of the digitizer's channel. The status can any of the following as shown in remark section below.
Public method | Initiate | This function causes the M9216 to start acquiring waveform on all channels. In AgM9216TriggerModeImmediate mode, all channels will start waveform acquisiton. In AgM9216TriggerModeChannel mode, each channel will wait for a valid trigger from its source signal before acquiring data..
Public method | WaitForAcquisitionComplete | Waits until the initiated acquisition is complete. Acquisition is complete when all channel(s) have successfully acquired the waveform or timed out waiting for a valid trigger. If no acquisition is currently running, this function returns immediately.
Top

See Also

Reference

Agilent.AgM9216.Interop Namespace


IAgM9216Channel Interface

[image]

AgM9216 IVI Driver Reference Agilent Technologies
IAgM9216Channel Interface
See Also

IAgM9216Channel interface.

Namespace: Agilent.AgM9216.Interop
Assembly: Agilent.AgM9216.Interop (in Agilent.AgM9216.Interop.dll)

Syntax

Visual Basic
Public Interface IAgM9216Channel
C#
public interface IAgM9216Channel
Visual C++
__interface IAgM9216Channel

Properties

 | Name | Description
Public property | AuxOutEnabled | Set this property to true to switch the currently selected input port to instead become an auxiliary output port of the digitizer. A true setting is not allowed in AgM9216MeasurementModeSingle mode. Users are not allowed to switch to Auxiliary ports in this mode.
Public property | BankID | -- READ ONLY -- In multichannel mode this property returns the bank number of the specified digitizer(channel). In Single Channel mode, there is only one logical digitizer channel, the value returned is always 0. See the link further below for a table of information..
Public property | InputConnectorSelection | Select the logical input connector to for each channel. In AgM9216MeasurementModeMultiple mode, there are four input connectors for each channel while in AgM9216MeasurementModeSingle mode, the Input Port selection must be used to specify which physical connection will supply the signal to be measured.The input will be either connected to the specified digitizer (channel) or the auxiliary output port, depending upon the AuxOutEnabled setting.
Public property | InputPort | Select the input port for the channel. Note that the multiplexer relays in the hardware will only be activated after the UpdateHardware command is sent.The input port will be either connected to the specified digitizer (channel) or auxiliary out port, depending on the AuxOutEnabled property setting.
Public property | Measurement | Pointer to the IAgM9216ChannelsMeasurement interface.
Public property | RecordSize | Sets or reads the number of samples to acquire for the waveform. This property applies for the currently selected port. To set the record length for a port that is not currently selected, use the Configure function.
Public property | Trigger | Pointer to the IAgM9216ChannelTrigger interface.
Top

Methods

 | Name | Description
Public method | Configure | This function allows the user to configure any of the input ports that belongs to this channel. InputPort does not have to be the currently selected port. The M9216A allows each input port to have a unique configuration. When the user selects an input port for acquistion, using the InputPort (or InputConnectorSelection) property, the digitizer channel will automatically be configured with the port's configuration.Note that if the InputPort does not belong to the channel , an error code will be returned.
Top

See Also

Reference

Agilent.AgM9216.Interop Namespace


IAgM9216ChannelMeasurement Interface

[image]

AgM9216 IVI Driver Reference Agilent Technologies
IAgM9216ChannelMeasurement Interface
See Also

IAgM9216ChannelsMeasurement interface.

Namespace: Agilent.AgM9216.Interop
Assembly: Agilent.AgM9216.Interop (in Agilent.AgM9216.Interop.dll)

Syntax

Visual Basic
Public Interface IAgM9216ChannelMeasurement
C#
public interface IAgM9216ChannelMeasurement
Visual C++
__interface IAgM9216ChannelMeasurement

Properties

 | Name | Description
Public property | RangeSelect | Selects which waveform data from the 5V and 100V sub channels of the digitizer will be fetched to the driver after completing acquisition.When the M9216 is reset, the default value is AgM9216DigitizerRangeSelectBoth.
Top

Methods

 | Name | Description
Public method | FetchWaveformInt32 | When an acquisition for a channel has been completed successfully, acquisition data will be sent from the channel to the controller's driver memory. The user can use this function to copy the data into the user's buffer.
Public method | FetchWaveformReal64 | When an acquisition has been completed successfully, data will be prefetched from the hardware to the controller's driver memory. The user uses this function to calculate the actual voltage of the waveform and copy the result into user?s buffer. The voltage is calculated with the stored calibration coefficient.Note that when an acquisition is not successful, no data will be prefetched to the driver. The user can also choose not to prefetch any data by using the RangeSelect property.
Top

See Also

Reference

Agilent.AgM9216.Interop Namespace


IAgM9216Channels Interface

[image]

AgM9216 IVI Driver Reference Agilent Technologies
IAgM9216Channels Interface
See Also

IAgM9216Channels interface.

Namespace: Agilent.AgM9216.Interop
Assembly: Agilent.AgM9216.Interop (in Agilent.AgM9216.Interop.dll)

Syntax

Visual Basic
Public Interface IAgM9216Channels
C#
public interface IAgM9216Channels
Visual C++
__interface IAgM9216Channels

Properties

 | Name | Description
Public property | Count | -- READ ONLY -- This property determines the number of channels available in the digitizer. When the digitizer is in multiple channel mode, the return value is eight. In single channel mode, the return value is one.
Public property | Item | Channels Item uniquely identifies the channel in the channels collection. It returns a pointer to the IAgM9216Channel interface.
Public property | Name | -- READ ONLY -- Channels Item uniquely identifies the channel in the channels collection. It returns a pointer to the IAgM9216Channel interface.
Top

See Also

Reference

Agilent.AgM9216.Interop Namespace


IAgM9216ChannelTrigger Interface

[image]

AgM9216 IVI Driver Reference Agilent Technologies
IAgM9216ChannelTrigger Interface
See Also

IAgM9216ChannelTrigger interface.

Namespace: Agilent.AgM9216.Interop
Assembly: Agilent.AgM9216.Interop (in Agilent.AgM9216.Interop.dll)

Syntax

Visual Basic
Public Interface IAgM9216ChannelTrigger
C#
public interface IAgM9216ChannelTrigger
Visual C++
__interface IAgM9216ChannelTrigger

Properties

 | Name | Description
Public property | Delay | Specifies the length of time from the valid trigger event to the first point in the waveform record. The units are in microseconds. See example code in Remarks section. Note that this setting is ignored if TriggerMode is AgM9216TriggerModeImmediate.
Public property | HoldOffCount | Specifies the number of valid edges to detect before waveform recording can occur.Note that this setting is ignored if TriggerMode is AgM9216TriggerModeImmediate
Public property | Hysteresis | Specifies the trigger hysteresis in Volts. Note that this setting is ignored if TriggerMode is AgM9216TriggerModeImmediate.
Public property | Level | Specifies the voltage threshold for the trigger sub-system. The units are Volts.Note that this setting is ignored if TriggerMode is AgM9216TriggerModeImmediate.
Public property | PreTriggerSamples | Specifies the number of samples that must be collected before a trigger event will be recognized. This value must not exceed the RecordSize of the waveform.This setting is ignored if TriggerMode is AgM9216TriggerModeImmediate.
Public property | Slope | Specifies trigger slope for the input port as either rising edge, falling edge ,both edges or DC level.Valid values are AgM9216TriggerSlopePositive , AgM9216TriggerSlopeNegative and AgM9216TriggerSlopeBoth, AgM9216TriggerSlopeLevel .This setting is ignored if TriggerMode is AgM9216TriggerModeImmediate.
Public property | TimeOut | Specifies the maximum allowable time for the channel to detect a valid trigger condition as specified by the configuration parameters. If the trigger condition is not met, a AgM9216AcquisitionStatusTimeOut is returned as acquisition status.The units are set in multiples of one microsecond.This setting is ignored if TriggerMode is AgM9216TriggerModeImmediate.
Top

See Also

Reference

Agilent.AgM9216.Interop Namespace


IAgM9216System Interface

[image]

AgM9216 IVI Driver Reference Agilent Technologies
IAgM9216System Interface
See Also

IAgM9216System interface.

Namespace: Agilent.AgM9216.Interop
Assembly: Agilent.AgM9216.Interop (in Agilent.AgM9216.Interop.dll)

Syntax

Visual Basic
Public Interface IAgM9216System
C#
public interface IAgM9216System
Visual C++
__interface IAgM9216System

Properties

 | Name | Description
Public property | BoardRevision | -- READ ONLY -- Returns the PCB version.
Public property | CalibationDate | -- READ ONLY -- Returns the Calibration Date from EEPROM.
Public property | DriverRevision | -- READ ONLY -- Returns the fundamental driver revision.
Public property | FPGARevision | -- READ ONLY -- Returns the FPGA firmware version.
Public property | SerialNumber | -- READ ONLY -- Returns the serial number of the module.
Public property | SlotNumber | -- READ ONLY -- Returns the the slot number of the card.
Public property | TraceEnabled | If true, output trace log of all driver calls to an XML file using a unique file name based on date and time in the same directory as the application executable accessing the driver OR as specified using tracing options when initializing the driver. See remarks below for tracing options information. The log file may be viewed in your web browser. If enabled, driver trace and additional IO events may also be viewed in the IO Monitor utility of Agilent IO Libraries 16.0 or newer.
Top

See Also

Reference

Agilent.AgM9216.Interop Namespace


AgM9216AcquisitionStatusEnum Enumeration

[image]

AgM9216 IVI Driver Reference Agilent Technologies
AgM9216AcquisitionStatusEnum Enumeration
See Also

Defined Acquition status ( 0: Idle, 1: Busy, 2: Completed, 3: Timeout).

Namespace: Agilent.AgM9216.Interop
Assembly: Agilent.AgM9216.Interop (in Agilent.AgM9216.Interop.dll)

Syntax

Visual Basic
Public Enumeration AgM9216AcquisitionStatusEnum
C#
public enum AgM9216AcquisitionStatusEnum
Visual C++
public enum class AgM9216AcquisitionStatusEnum

Members

Member name | Value | Description
AgM9216AcquisitionStatusIdle | 0x00000000 | The channel is idle. No acquisition has been initiated.
AgM9216AcquisitionStatusBusy | 0x00000001 | The channel is still in the process of looking for a trigger or still aquiring data.
AgM9216AcquisitionStatusCompleted | 0x00000002 | The acquisiton has completed successfully.
AgM9216AcquisitionStatusTimeOut | 0x00000003 | Applicable when trigger mode is set to AgM9216TriggerModeChannel. The acquisition has failed because a valid trigger was not received during within the specified time out period. No data will be available from the channel(s) that had a timeout.

See Also

Reference

Agilent.AgM9216.Interop Namespace


AgM9216ErrorCodesEnum Enumeration

[image]

AgM9216 IVI Driver Reference Agilent Technologies
AgM9216ErrorCodesEnum Enumeration
See Also

Namespace: Agilent.AgM9216.Interop
Assembly: Agilent.AgM9216.Interop (in Agilent.AgM9216.Interop.dll)

Syntax

Visual Basic
Public Enumeration AgM9216ErrorCodesEnum
C#
public enum AgM9216ErrorCodesEnum
Visual C++
public enum class AgM9216ErrorCodesEnum

Members

Member name | Value | Description
E_AGM9216_IO_GENERAL | 0x80044214 | I/O error.
E_AGM9216_IO_TIMEOUT | 0x80044215 | I/O timeout error.
E_AGM9216_MODEL_NOT_SUPPORTED | 0x80044216 | Instrument model does not support this feature.
E_AGM9216_PERSONALITY_NOT_ACTIVE | 0x80044211 | Personality is not active.
E_AGM9216_PERSONALITY_NOT_LICENSED | 0x80044213 | Personality is not licensed.
E_AGM9216_PERSONALITY_NOT_INSTALLED | 0x80044212 | Personality is not installed.
E_AGM9216_INVALID_MEASUREMENT_MODE | 0x8004401D |
E_AGM9216_INVALID_INPUT_PORT | 0x80044020 |
E_AGM9216_INVALID_CONNECTOR | 0x8004401F |
E_AGM9216_INVALID_RECORD_SIZE | 0x8004401E |
E_AGM9216_INVALID_CONFIGURE | 0x8004401B |
E_AGM9216_FETCHDATA_ERROR | 0x8004401C |
E_AGM9216_INVALID_TRIGGER_TYPE | 0x80044029 |
E_AGM9216_INVALID_HYSTERESIS_VALUE | 0x8004402A |
E_AGM9216_INVALID_LEVEL_VALUE | 0x8004402B |
E_AGM9216_INVALID_HOLDOFFCOUNT_VALUE | 0x8004402C |
E_AGM9216_INVALID_DELAY | 0x8004402D |

See Also

Reference

Agilent.AgM9216.Interop Namespace


AgM9216MeasurementModeEnum Enumeration

[image]

AgM9216 IVI Driver Reference Agilent Technologies
AgM9216MeasurementModeEnum Enumeration
See Also

Defined Measurement mode (0 - Single channel, 1 - Multiple Channels)

Namespace: Agilent.AgM9216.Interop
Assembly: Agilent.AgM9216.Interop (in Agilent.AgM9216.Interop.dll)

Syntax

Visual Basic
Public Enumeration AgM9216MeasurementModeEnum
C#
public enum AgM9216MeasurementModeEnum
Visual C++
public enum class AgM9216MeasurementModeEnum

Members

Member name | Value | Description
AgM9216MeasurementModeSingle | 0x00000000 | sets Single channel measurement mode
AgM9216MeasurementModeMultiple | 0x00000001 | sets Multiple channels measurement mode

See Also

Reference

Agilent.AgM9216.Interop Namespace


AgM9216MeasurementRangeSelectEnum Enumeration

[image]

AgM9216 IVI Driver Reference Agilent Technologies
AgM9216MeasurementRangeSelectEnum Enumeration
See Also

Defined fetch waveform data from the sub channels (0 - AgM9216DigitizerRangeSelectLow, 1 - Fetch only the wavefrom from 100V Range sub channel. 2 - AgM9216DigitizerRangeSelectBoth[Default], 3 - AgM9216DigitizerRangeSelectNone)

Namespace: Agilent.AgM9216.Interop
Assembly: Agilent.AgM9216.Interop (in Agilent.AgM9216.Interop.dll)

Syntax

Visual Basic
Public Enumeration AgM9216MeasurementRangeSelectEnum
C#
public enum AgM9216MeasurementRangeSelectEnum
Visual C++
public enum class AgM9216MeasurementRangeSelectEnum

Members

Member name | Value | Description
AgM9216MeasurementRangeSelectLow | 0x00000000 | Fetch only the wavefrom from 5V Range sub channel.
AgM9216MeasurementRangeSelectHigh | 0x00000001 | Fetch only the wavefrom from 100V Range sub channel.
AgM9216MeasurementRangeSelectBoth | 0x00000002 | Fetch the wavefrom from both the 5V and 100V Range sub channels.
AgM9216MeasurementRangeSelectNone | 0x00000003 | Do not prefetch any data.

See Also

Reference

Agilent.AgM9216.Interop Namespace


AgM9216TriggerModeEnum Enumeration

[image]

AgM9216 IVI Driver Reference Agilent Technologies
AgM9216TriggerModeEnum Enumeration
See Also

Defined available trigger mode(AgM9216TriggerModeChannel (default) or AgM9216TriggerModeImmediate)

Namespace: Agilent.AgM9216.Interop
Assembly: Agilent.AgM9216.Interop (in Agilent.AgM9216.Interop.dll)

Syntax

Visual Basic
Public Enumeration AgM9216TriggerModeEnum
C#
public enum AgM9216TriggerModeEnum
Visual C++
public enum class AgM9216TriggerModeEnum

Members

Member name | Value | Description
AgM9216TriggerModeChannel | 0x00000000 | Each channel waits for a valid trigger from its source signal before acquiring data..
AgM9216TriggerModeImmediate | 0x00000001 | Channels start waveform aquisiton immediately

See Also

Reference

Agilent.AgM9216.Interop Namespace


AgM9216TriggerSlopeEnum Enumeration

[image]

AgM9216 IVI Driver Reference Agilent Technologies
AgM9216TriggerSlopeEnum Enumeration
See Also

Defined available slope( 0 - AgM9216TriggerSlopePositive (default), 1 - AgM9216TriggerSlopeNegative, 2 - AgM9216TriggerSlopeBoth, 3 - AgM9216TriggerSlopeLevel).

Namespace: Agilent.AgM9216.Interop
Assembly: Agilent.AgM9216.Interop (in Agilent.AgM9216.Interop.dll)

Syntax

Visual Basic
Public Enumeration AgM9216TriggerSlopeEnum
C#
public enum AgM9216TriggerSlopeEnum
Visual C++
public enum class AgM9216TriggerSlopeEnum

Members

Member name | Value | Description
AgM9216TriggerSlopePositive | 0x00000000 | Configures trigger on the Positive slope.
AgM9216TriggerSlopeNegative | 0x00000001 | Configures trigger on the Negative slope.
AgM9216TriggerSlopeBoth | 0x00000002 | Configures trigger on the both.
AgM9216TriggerSlopeLevel | 0x00000003 | Configures trigger on the DC level slope.

See Also

Reference

Agilent.AgM9216.Interop Namespace


Ivi.Driver.Interop Namespace

[image]

AgM9216 IVI Driver Reference Agilent Technologies
Ivi.Driver.Interop Namespace

Interfaces

 | Interface | Description
Public interface | IIviClassWrapper | IVI Driver class wrapper interface
Public interface | IIviComponentIdentity | IVI Driver component identity interface
Public interface | IIviDriver | IVI Driver root interface
Public interface | IIviDriverIdentity | IVI Driver identity interface
Public interface | IIviDriverOperation | IVI Driver operation interface
Public interface | IIviDriverUtility | IVI Driver utility interface

Enumerations

 | Enumeration | Description
Public enumeration | IviDriver_ErrorCodes | IVI Driver (inherent features) defined HRESULTS


IIviClassWrapper Interface

[image]

AgM9216 IVI Driver Reference Agilent Technologies
IIviClassWrapper Interface
See Also

IVI Driver class wrapper interface

Namespace: Ivi.Driver.Interop
Assembly: Ivi.Driver.Interop (in Ivi.Driver.Interop.DLL)

Syntax

Visual Basic
Public Interface IIviClassWrapper
C#
public interface IIviClassWrapper
Visual C++
__interface IIviClassWrapper

Properties

 | Name | Description
Public property | NativeCHandle | The C session handle that the COM wrapper is currently using to communicate with an IVI-C specific driver.
Top

Methods

 | Name | Description
Public method | AttachToExistingCSession | Binds a COM wrapper object to an existing IVI-C specific driver session.
Top

See Also

Reference

Ivi.Driver.Interop Namespace


AttachToExistingCSession Method

[image]

AgM9216 IVI Driver Reference Agilent Technologies
IIviClassWrapper..::.AttachToExistingCSession Method
IIviClassWrapper See Also

Binds a COM wrapper object to an existing IVI-C specific driver session.

Namespace: Ivi.Driver.Interop
Assembly: Ivi.Driver.Interop (in Ivi.Driver.Interop.DLL)

Syntax

Visual Basic
Public Sub AttachToExistingCSession ( _
    ByVal  Vi As Integer  _
)
C#
public void  AttachToExistingCSession(
    int  Vi
)
Visual C++
HRESULT AttachToExistingCSession(
    long  Vi
);

Parameters

Vi

See Also

Reference

IIviClassWrapper Interface
Ivi.Driver.Interop Namespace


NativeCHandle Property

[image]

AgM9216 IVI Driver Reference Agilent Technologies
IIviClassWrapper..::.NativeCHandle Property
IIviClassWrapper See Also

The C session handle that the COM wrapper is currently using to communicate with an IVI-C specific driver.

Namespace: Ivi.Driver.Interop
Assembly: Ivi.Driver.Interop (in Ivi.Driver.Interop.DLL)

Syntax

Visual Basic
Public ReadOnly Property NativeCHandle As Integer
C#
public int  NativeCHandle { get; }
Visual C++
HRESULT get_NativeCHandle(
    long*  val
);

See Also

Reference

IIviClassWrapper Interface
Ivi.Driver.Interop Namespace


IIviComponentIdentity Interface

[image]

AgM9216 IVI Driver Reference Agilent Technologies
IIviComponentIdentity Interface
See Also

IVI Driver component identity interface

Namespace: Ivi.Driver.Interop
Assembly: Ivi.Driver.Interop (in Ivi.Driver.Interop.DLL)

Syntax

Visual Basic
Public Interface IIviComponentIdentity
C#
public interface IIviComponentIdentity
Visual C++
__interface IIviComponentIdentity

Properties

 | Name | Description
Public property | Description | A brief description of the implementing component. Description is limted to 256 bytes.
Public property | Revision | The revision of the implementing component. Refer to IVI 3.1, Section 3.1.2.2, for a description of revision syntax and semantics. Revision is limited to 256 bytes.
Public property | Vendor | The name of the vendor that supplies the implementing component. Vendor is limited to 256 bytes.
Top

See Also

Reference

Ivi.Driver.Interop Namespace


IIviDriverIdentity Interface

[image]

AgM9216 IVI Driver Reference Agilent Technologies
IIviDriverIdentity Interface
See Also

IVI Driver identity interface

Namespace: Ivi.Driver.Interop
Assembly: Ivi.Driver.Interop (in Ivi.Driver.Interop.DLL)

Syntax

Visual Basic
Public Interface IIviDriverIdentity
   Inherits IIviComponentIdentity
C#
public interface IIviDriverIdentity : IIviComponentIdentity
Visual C++
__interface IIviDriverIdentity : IIviComponentIdentity

Properties

 | Name | Description
Public property | Description | A brief description of the implementing component. Description is limted to 256 bytes. (Inherited from IIviComponentIdentity.)
Public property | GroupCapabilities | A comma-separated list of the class capability groups implemented by the driver. Capability group names are documented in the IVI class specifications. If the driver is not class compliant, the driver returns an empty string.
Public property | Identifier | The case-sensitive unique identifier of the implementing IVI-COM instrument driver.
Public property | InstrumentFirmwareRevision | The firmware revision reported by the physical instrument. If Simulation is enabled or the instrument is not capable of reporting the firmware revision, a string is returned that explains the condition.
Public property | InstrumentManufacturer | The name of the manufacturer reported by the physical instrument. If Simulation is enabled or the instrument is not capable of reporting the name of the manufacturer, a string is returned that explains the condition. Manufacturer is limited to 256 bytes
Public property | InstrumentModel | The model number or name reported by the physical instrument. If Simulation is enabled or the instrument is not capable of reporting the model number or name, a string is returned that explains the condition. Model is limited to 256 bytes
Public property | Revision | The revision of the implementing component. Refer to IVI 3.1, Section 3.1.2.2, for a description of revision syntax and semantics. Revision is limited to 256 bytes. (Inherited from IIviComponentIdentity.)
Public property | SpecificationMajorVersion | For IVI class-compliant drivers, the major version number of the instrument class specification. If the driver is not class compliant, the driver returns zero.
Public property | SpecificationMinorVersion | For IVI class-compliant drivers, the minor version number of the instrument class specification. If the driver is not class compliant, the driver returns zero.
Public property | SupportedInstrumentModels | A comma-separated list of instrument models that the IVI specific driver can control. The string does not include an abbreviation for the manufacturer if it is the same for all models.
Public property | Vendor | The name of the vendor that supplies the implementing component. Vendor is limited to 256 bytes. (Inherited from IIviComponentIdentity.)
Top

See Also

Reference

Ivi.Driver.Interop Namespace


IIviDriverOperation Interface

[image]

AgM9216 IVI Driver Reference Agilent Technologies
IIviDriverOperation Interface
See Also

IVI Driver operation interface

Namespace: Ivi.Driver.Interop
Assembly: Ivi.Driver.Interop (in Ivi.Driver.Interop.DLL)

Syntax

Visual Basic
Public Interface IIviDriverOperation
C#
public interface IIviDriverOperation
Visual C++
__interface IIviDriverOperation

Properties

 | Name | Description
Public property | Cache | Drivers may choose to always cache some instrument settings, never cache others, and optionally cache others, to avoid unecessary I/O to the instrument. If True, the driver caches optionally cached instrument settings.
Public property | DriverSetup | The driver setup string. It is either specified in the Configuration Store or passed in the OptionString parameter of the Initialize function. Driver setup is empty if the driver is not initialized.
Public property | InterchangeCheck | If True, the driver maintains a record of interchangeability warnings. If the driver does not support interchangeability checking, attempts to set InterchangeCheck to True return an error.
Public property | IoResourceDescriptor | The resource descriptor specifies the connection to a physical device. It is either specified in the Configuration Store or passed in the ResourceName parameter of the Initialize function. It is empty if the driver is not initialized.
Public property | LogicalName | Logical Name identifies a driver session in the Configuration Store. If Logical Name is not empty, the driver was initialized from information in the driver session. If it is empty, the driver was initialized without using the Configuration Store.
Public property | QueryInstrumentStatus | If True, the driver queries the instrument status at the end of each method or property that performs I/O to the instrument. If an error is reported, use ErrorQuery to retrieve error messages one at a time from the instrument.
Public property | RangeCheck | Drivers may choose to always validate some property/parameter values, never validate others, and optionally validate others, to avoid sending invalid commands to the instrument. If True, the driver performs optional validations.
Public property | RecordCoercions | If True, the driver keeps a list of the value coercions it makes for ViInt32 and ViReal64 attributes. If the driver does not support coercion recording, attempts to set RecordCoercions to True will return an error.
Public property | Simulate | If True, the driver does not perform I/O to the instrument, and returns simulated values for output parameters.
Top

Methods

 | Name | Description
Public method | ClearInterchangeWarnings | Clears the list of interchangeability warnings that the IVI specific driver maintains.
Public method | GetNextCoercionRecord | Returns the oldest record from the coercion record list. Records are only added to the list if RecordCoercions is True.
Public method | GetNextInterchangeWarning | Returns the oldest warning from the interchange warning list. Records are only added to the list if InterchangeCheck is True.
Public method | InvalidateAllAttributes | Invalidates all of the driver's cached values.
Public method | ResetInterchangeCheck | Resets the interchangeability checking algorithms of the driver so that methods and properties that executed prior to calling this function have no affect on whether future calls to the driver generate interchangeability warnings.
Top

See Also

Reference

Ivi.Driver.Interop Namespace


IIviDriverUtility Interface

[image]

AgM9216 IVI Driver Reference Agilent Technologies
IIviDriverUtility Interface
See Also

IVI Driver utility interface

Namespace: Ivi.Driver.Interop
Assembly: Ivi.Driver.Interop (in Ivi.Driver.Interop.DLL)

Syntax

Visual Basic
Public Interface IIviDriverUtility
C#
public interface IIviDriverUtility
Visual C++
__interface IIviDriverUtility

Methods

 | Name | Description
Public method | Disable | --NOT SUPPORTED-- Quickly places the instrument in a state where it has no, or minimal, effect on the external system to which it is connected. This state is not necessarily a known state.
Public method | ErrorQuery | --NOT SUPPORTED-- Queries the instrument and returns instrument specific error information. This function can be used when QueryInstrumentStatus is True to retrieve error details when the driver detects an instrument error.
Public method | LockObject | Obtains a multithread lock on the driver after waiting until all other execution threads have released their locks on the instrument session.
Public method | Reset | Places the M9216 into a known state.
Public method | ResetWithDefaults | This function resets the M9216. All ports and properties will be set to the default values. A UpDateHardware command will be sent. This method needs to be called once when the M9216A is first started up.
Public method | SelfTest | --NOT SUPPORTED-- Performs an instrument self test, waits for the instrument to complete the test, and queries the instrument for the results. If the instrument passes the test, TestResult is zero and TestMessage is 'Self test passed'.
Public method | UnlockObject | Releases a previously obtained mutlithread lock.
Top

See Also

Reference

Ivi.Driver.Interop Namespace


IviDriver_ErrorCodes Enumeration

[image]

AgM9216 IVI Driver Reference Agilent Technologies
IviDriver_ErrorCodes Enumeration
See Also

IVI Driver (inherent features) defined HRESULTS

Namespace: Ivi.Driver.Interop
Assembly: Ivi.Driver.Interop (in Ivi.Driver.Interop.DLL)

Syntax

Visual Basic
Public Enumeration IviDriver_ErrorCodes
C#
public enum IviDriver_ErrorCodes
Visual C++
public enum class IviDriver_ErrorCodes

Members

Member name | Value | Description
S_IVI_SUCCESS | 0x00000000 | Success.
E_IVI_CANNOT_RECOVER | 0x80047000 | Unrecoverable failure.
E_IVI_INSTRUMENT_STATUS | 0x80047001 | Instrument error detected.
E_IVI_CANNOT_OPEN_FILE | 0x80047002 | File could not be opened.
E_IVI_READING_FILE | 0x80047003 | File could not be read.
E_IVI_WRITING_FILE | 0x80047004 | File could not be written.
E_IVI_INVALID_PATHNAME | 0x8004700B | The path name is invalid.
E_IVI_INVALID_VALUE | 0x80047010 | Invalid value for parameter or property.
E_IVI_METHOD_NOT_SUPPORTED | 0x80047011 | Method not supported.
E_IVI_PROPERTY_NOT_SUPPORTED | 0x80047012 | Property not supported.
E_IVI_VALUE_NOT_SUPPORTED | 0x80047013 | The enumeration value for the parameter is not supported.
E_IVI_NOT_INITIALIZED | 0x8004701D | A connection to the instrument has not been initialized.
E_IVI_UNKNOWN_CHANNEL_NAME | 0x80047020 | Channel or repeated capability name specified is not valid for the instrument.
E_IVI_TOO_MANY_OPEN_FILES | 0x80047023 | Too many files opened.
E_IVI_CHANNEL_NAME_REQUIRED | 0x80047044 | Channel or repeated capability name required.
E_IVI_MISSING_OPTION_NAME | 0x80047049 | The option string contains an entry without a name.
E_IVI_MISSING_OPTION_VALUE | 0x8004704A | The option string contains an entry without a value.
E_IVI_BAD_OPTION_NAME | 0x8004704B | The option string contains an entry with an unknown option name.
E_IVI_BAD_OPTION_VALUE | 0x8004704C | The option string contains an entry with an unknown option value.
E_IVI_OUT_OF_MEMORY | 0x80047056 | The necessary memory could not be allocated.
E_IVI_OPERATION_PENDING | 0x80047057 | Operation in progress.
E_IVI_NULL_POINTER | 0x80047058 | Null pointer passed for parameter or property.
E_IVI_UNEXPECTED_RESPONSE | 0x80047059 | Unexpected response from the instrument.
E_IVI_FILE_NOT_FOUND | 0x8004705B | File not found.
E_IVI_INVALID_FILE_FORMAT | 0x8004705C | The file format is invalid.
E_IVI_STATUS_NOT_AVAILABLE | 0x8004705D | The instrument status is not available.
E_IVI_ID_QUERY_FAILED | 0x8004705E | Instrument ID query failed.
E_IVI_RESET_FAILED | 0x8004705F | Instrument reset failed.
E_IVI_RESOURCE_UNKNOWN | 0x80047060 | Insufficient location information or resource not present in the system.
E_IVI_ALREADY_INITIALIZED | 0x80047061 | The driver is already initialized.
E_IVI_CANNOT_CHANGE_SIMULATION_STATE | 0x80047062 | The simulation state cannot be changed.
E_IVI_INVALID_NUMBER_OF_LEVELS_IN_SELECTOR | 0x80047063 | The number of levels in the selector is not valid for the repeated capability.
E_IVI_INVALID_RANGE_IN_SELECTOR | 0x80047064 | The range is not valid for the repeated capability.
E_IVI_UNKNOWN_NAME_IN_SELECTOR | 0x80047065 | Unknown name in selector.
E_IVI_BADLY_FORMED_SELECTOR | 0x80047066 | The repeated capability selector is badly-formed.
E_IVI_UNKNOWN_PHYSICAL_IDENTIFIER | 0x80047067 | Unknown physical repeated capability selector.
S_IVI_NSUP_ID_QUERY | 0x00047065 | Identification query not supported.
S_IVI_NSUP_RESET | 0x00047066 | Reset operation not supported.
S_IVI_NSUP_SELF_TEST | 0x00047067 | Self test operation not supported.
S_IVI_NSUP_ERROR_QUERY | 0x00047068 | Error query operation not supported.
S_IVI_NSUP_REV_QUERY | 0x00047069 | Revision query not supported.

See Also

Reference

Ivi.Driver.Interop Namespace


Errors and Warnings

[image]

AgM9216 IVI Driver Reference Agilent Technologies
Errors and Warnings

Errors

Name | Value (Hex) | Value (Decimal) | Description
E_IVI_CANNOT_RECOVER | 0x80047000 | -2147192832 | Failure cannot recover.
E_IVI_INSTRUMENT_STATUS | 0x80047001 | -2147192831 | Instrument error detected. Use ErrorQuery() to determine error(s).
E_IVI_CANNOT_OPEN_FILE | 0x80047002 | -2147192830 | Cannot open file.
E_IVI_READING_FILE | 0x80047003 | -2147192829 | Error reading file.
E_IVI_WRITING_FILE | 0x80047004 | -2147192828 | Error writing file.
E_IVI_INVALID_PATHNAME | 0x8004700B | -2147192821 | The path name is invalid.
E_IVI_INVALID_VALUE | 0x80047010 | -2147192816 | Invalid value (%1) for method %2, parameter %3.
E_IVI_METHOD_NOT_SUPPORTED | 0x80047011 | -2147192815 | Does not support this class-compliant feature: method %1.
E_IVI_PROPERTY_NOT_SUPPORTED | 0x80047012 | -2147192814 | Does not support this class-compliant feature: property %1.
E_IVI_VALUE_NOT_SUPPORTED | 0x80047013 | -2147192813 | Does not support this class-compliant feature: (enumeration) value %1 passed as the value for parameter %2 in method %3.
E_IVI_NOT_INITIALIZED | 0x8004701D | -2147192803 | A connection to the instrument has not been established.
E_IVI_UNKNOWN_CHANNEL_NAME | 0x80047020 | -2147192800 | Unknown channel name.
E_IVI_TOO_MANY_OPEN_FILES | 0x80047023 | -2147192797 | Too many files are opened.
E_IVI_CHANNEL_NAME_REQUIRED | 0x80047044 | -2147192764 | A channel name is required.
E_IVI_MISSING_OPTION_NAME | 0x80047049 | -2147192759 | The option string is missing an option name.
E_IVI_MISSING_OPTION_VALUE | 0x8004704A | -2147192758 | The option string is missing an option value.
E_IVI_BAD_OPTION_NAME | 0x8004704B | -2147192757 | The %1 name in the option string is unknown.
E_IVI_BAD_OPTION_VALUE | 0x8004704C | -2147192756 | The %1 value in the option string is unknown.
E_IVI_OUT_OF_MEMORY | 0x80047056 | -2147192746 | Could not allocate necessary memory.
E_IVI_OPERATION_PENDING | 0x80047057 | -2147192745 | Operation in progress.
E_IVI_NULL_POINTER | 0x80047058 | -2147192744 | Null pointer passed for method %1, parameter %2.
E_IVI_UNEXPECTED_RESPONSE | 0x80047059 | -2147192743 | Unexpected response from the instrument.
E_IVI_FILE_NOT_FOUND | 0x8004705B | -2147192741 | File not found.
E_IVI_INVALID_FILE_FORMAT | 0x8004705C | -2147192740 | Invalid file format.
E_IVI_STATUS_NOT_AVAILABLE | 0x8004705D | -2147192739 | The instrument status is not available.
E_IVI_ID_QUERY_FAILED | 0x8004705E | -2147192738 | Instrument ID query failed.
E_IVI_RESET_FAILED | 0x8004705F | -2147192737 | Instrument reset failed.
E_IVI_RESOURCE_UNKNOWN | 0x80047060 | -2147192736 | Unknown resource.
E_IVI_ALREADY_INITIALIZED | 0x80047061 | -2147192735 | The driver is already initialized.
E_IVI_CANNOT_CHANGE_SIMULATION_STATE | 0x80047062 | -2147192734 | The simulation state cannot be changed.
E_IVI_INVALID_NUMBER_OF_LEVELS_IN_SELECTOR | 0x80047063 | -2147192733 | The number of levels in the selector is not valid for the %1 repeated capability.
E_IVI_INVALID_RANGE_IN_SELECTOR | 0x80047064 | -2147192732 | The range %1 is not valid for the repeated capability %2.
E_IVI_UNKNOWN_NAME_IN_SELECTOR | 0x80047065 | -2147192731 | Unknown name in selector.
E_IVI_BADLY_FORMED_SELECTOR | 0x80047066 | -2147192730 | The repeated capability selector is badly-formed.
E_IVI_UNKNOWN_PHYSICAL_IDENTIFIER | 0x80047067 | -2147192729 | Unknown physical repeated capability selector.
E_AGM9216_INVALID_CONFIGURE | 0x8004401B | -2147205093 | Specified Configure setting(s) is Invalid.
E_AGM9216_FETCHDATA_ERROR | 0x8004401C | -2147205092 | Fetch Data Error
E_AGM9216_INVALID_MEASUREMENT_MODE | 0x8004401D | -2147205091 | Specified Measurement Mode is Invalid.
E_AGM9216_INVALID_RECORD_SIZE | 0x8004401E | -2147205090 | Invalid RecordSize value
E_AGM9216_INVALID_CONNECTOR | 0x8004401F | -2147205089 | Specified Connector is Invalid
E_AGM9216_INVALID_INPUT_PORT | 0x80044020 | -2147205088 | Specified InputPort number is Invalid
E_AGM9216_INVALID_TRIGGER_TYPE | 0x80044029 | -2147205079 |
E_AGM9216_INVALID_HYSTERESIS_VALUE | 0x8004402A | -2147205078 |
E_AGM9216_INVALID_LEVEL_VALUE | 0x8004402B | -2147205077 | Invalid Level value
E_AGM9216_INVALID_HOLDOFFCOUNT_VALUE | 0x8004402C | -2147205076 | Invalid HoldOffCount value
E_AGM9216_INVALID_DELAY | 0x8004402D | -2147205075 |
E_AGM9216_PERSONALITY_NOT_ACTIVE | 0x80044211 | -2147204591 | Personality is not active.
E_AGM9216_PERSONALITY_NOT_INSTALLED | 0x80044212 | -2147204590 | Personality is not installed.
E_AGM9216_PERSONALITY_NOT_LICENSED | 0x80044213 | -2147204589 | Personality is not licensed.
E_AGM9216_IO_GENERAL | 0x80044214 | -2147204588 | I/O error: %1.
E_AGM9216_IO_TIMEOUT | 0x80044215 | -2147204587 | I/O timeout error: %1.
E_AGM9216_MODEL_NOT_SUPPORTED | 0x80044216 | -2147204586 | Instrument model does not support this feature: %1.
Top

Warnings

Name | Value (Hex) | Value (Decimal) | Description
S_IVI_SUCCESS | 0x0 | 0 | Success.
S_IVI_NSUP_ID_QUERY | 0x47065 | 290917 | ID Query is not supported by this instrument.
S_IVI_NSUP_RESET | 0x47066 | 290918 | Reset is not supported by this instrument.
S_IVI_NSUP_SELF_TEST | 0x47067 | 290919 | Self test is not supported by this instrument.
S_IVI_NSUP_ERROR_QUERY | 0x47068 | 290920 | Error query is not supported by this instrument.
S_IVI_NSUP_REV_QUERY | 0x47069 | 290921 | Firmware revision query is not supported by this instrument.
Top


AgM9216 IVI-C Driver

[image]

AgM9216 IVI Driver Reference Agilent Technologies
AgM9216 IVI-C Driver

The AgM9216 driver includes a fully compliant IVI-C driver. The topics in this section detail how to perform specific programming tasks using the IVI-C functionality available with the AgM9216 driver.

In This Section

Initializing the IVI-C Driver

Presents the steps required to properly initialize the IVI-C driver.

Accessing Instrument-Specific Functionality

Explains how to access the specialized functionality of the AgM9216 driver.

Using Simulation

Provides information on using the simulation capabilities of the driver.

Programming with the IVI-C Driver in Various Development Environment

Demonstrates how the AgM9216 driver can be used in a various application development environments (ADEs).

Reference

Presents reference documentation for each IVI-C function and attribute.


Initializing the IVI-C Driver

[image]

AgM9216 IVI Driver Reference Agilent Technologies
Initializing the IVI-C Driver

When using this specific driver directly, the client application will necessarily have references to the specific driver (through the use of the "AgM9216" in function call names and by directly references AgM9216.h and AgM9216.lib); For many applications, this is perfectly acceptable.

The examples below in the section describing the Initialize function will present this technique for initializing an IVI-C driver.

Calling the Initialize Function

The IVI-defined Initialize function offers a variety of options and parameters that control fundamental aspects of the driver's behavior. It is critical to understand what options are available and how they impact driver operation.

ResourceName

The resource name parameter can be a logical name present in the IVI Configuration Store or a physical resource descriptor. If the ResourceName is a logical name, then additional options stored in the IVI Configuration Store will be loaded and processed. This allows client code to reuse driver option settings and to keep the driver code as concise as possible, by removing settings that can be stored in the IVI Configuration Store. It is important to note that any parameters or options passed directly to the Initialize function via the OptionString parameter (discussed below) override any settings found in the IVI Configuration Store.

Interface Physical Resource Descriptor Syntax
GPIB GPIB[board]::primary address[::secondary address][::INSTR]
Example: GPIB0::18::INSTR
ASRL ASRL[board][::INSTR]
Example: ASRL1::INSTR
TCPIP TCPIP[board]::host address[::LAN device name]::INSTR
Example: TCPIP0::127.0.0.1::INSTR
TCPIP TCPIP[board]::host address::port::SOCKET
Example: TCPIP0::127.0.0.1::5025::SOCKET
USB USB[board]::manufacturer ID::model code::serial number[::USB interface number][::INSTR]
Example: USB0::2391::291::SN_001001::INSTR
PXI PXI[bus]::device[::function][::INSTR]
Example: PXI1::5::INSTR
PXI PXI0::CHASSISchassis::SLOTslot[::FUNCfunction][::INSTR]
PXI0::bus-device[.function][::INSTR]

IdQuery

If this is enabled, the driver will query the instrument model and compare it with a list of instrument models that is supported by the driver. If the model is not supported, Initialize will fail with the IVI_ERROR_ID_QUERY_FAILED error code.

Reset

If this is enabled, the driver will perform a reset of the instrument. If the reset fails, Initialize will fail with the IVI_ERROR_RESET_FAILED error code.

OptionString

The OptionString allows the user to pass optional settings to the driver. These settings override any settings that are specified in the IVI Configuration Store. If the IVI Configuration Store is not used (a resource descriptor is passed as the ResourceName instead of a logical name) then any setting that is not specified has a default value as specified by IVI.

Option Name | Description | Default
QueryInstrStatus | Specifies whether the IVI specific driver queries the instrument status at the end of each user operation. Querying the instrument status is very useful for debugging. After validating the program, the user can set this attribute to False to disable status checking and maximize performance. The user specifies this value for the entire IVI driver session. | false
Simulate | Specifies whether or not the IVI specific driver simulates instrument driver I/O operations. If simulation is enabled, the specific driver functions do not perform instrument I/O. For output parameters that represent instrument data, the specific driver functions return simulated values. | false
Cache | Specifies whether or not to cache the value of attributes. When caching is enabled, the IVI specific driver keeps track of the current instrument settings so that it can avoid sending redundant commands to the instrument. | true
InterchangeCheck | Specifies whether the IVI specific driver performs interchangeability checking. If the Interchange Check attribute is enabled, the specific driver maintains a record of each interchangeability warning that it encounters. The user calls the Get Next Interchange Warning function to extract and delete the oldest interchangeability warning from the list. | false
RangeCheck | Specifies whether the IVI specific driver validates attribute values and function parameters. If enabled, the specific driver validates the parameter values that users pass to driver functions. Validating attribute values and function parameters is useful for debugging. After validating the program, the user can set this attribute to False to disable range checking and maximize performance. | true
RecordCoercions | Specifies whether the IVI specific driver keeps a list of the value coercions it makes for ViInt32 and ViReal64 attributes. If the Record Value Coercions attribute is enabled, the specific driver maintains a record of each coercion. The user calls the Get Next Coercion Record function to extract and delete the oldest coercion record from the list. | false
DriverSetup | Specifies additional settings supported by the driver, but not defined by IVI. | ""

DriverSetup

This is used to specify settings that are supported by the driver but not defined by IVI. If the Options String parameter contains an assignment for the Driver Setup attribute, the Initialize function assumes that everything following 'DriverSetup=' is part of the assignment. The following settings are supported by the AgM9216 driver.

Option Name | Description | Default
Model | Instrument model to use during simulation. Must be one of the supported model strings as returned by the SUPPORTED_INSTRUMENT_MODELS attribute. | (default_model)
Trace | If true, output trace log of all driver calls to an XML file in the same directory as the application executable accessing the driver or as specified by the TraceName option. The log file may be viewed in your web browser. Beginning with Agilent IO Libraries Suite 16.0, driver trace messages may also be viewed with the IO Monitor utility. See IO Monitor help for details. | false
TraceName | If specified, sets the path and file name for the XML log file output when option Trace=true. It is not necessary to include the .xml extension with the name. Example: 'DriverSetup = Trace=true, TraceName=C:\Temp\TraceOut' If not specified, tracing generates a unique XML trace file name based on the date and time. A new file is created each time the driver is initialized with tracing enabled. | ""
TraceArray | If true, array parameter data is output to the trace log. | false
TraceArraySizeMax | Specifies the maximum number of elements to trace for array parameters. Requires option 'TraceArray=true'. | 10
TraceSizeMax | Specifies the maximum size of the trace log file in bytes. Once the file reaches this size, tracing will be turned off automatically by the driver. | 1000000
TraceSaveInterval | Specifies how often the driver should save trace data to the trace log file. The value is specified in minutes. | 1

Example 1 (simulation)

The following code initializes the driver in simulation mode and specifies the model to simulate.

C++ Copy image Copy Code
#include "AgM9216.h" // Specific driver header file

void main()
{
  ViStatus status;
  ViSession session;
  ViReal64 reading;

  // Initialize the driver with no range checking and no state caching
  // This will also check the instrument ID to make sure it is supported
  // and reset the instrument
  status = AgM9216_InitWithOptions("PXI54::14::0::INSTR", VI_TRUE, VI_TRUE, "Simulate=true, DriverSetup= Model=M9216A", &session);

  // ... call driver functions

  status = AgM9216_close(session);
}


Accessing Repeated Capabilities

[image]

AgM9216 IVI Driver Reference Agilent Technologies
Accessing Repeated Capabilities

This page provides information on the supported repeated capabilities and repeated capability names for the AgM9216 driver.

Repeated Capabilities

The AgM9216 driver supports the following repeated capabilities:

  • Channel

The following table provides detailed information on each repeated capability supported by the AgM9216 driver.

For a detailed explanation of repeated capabilities, including repeated capability styles, physical names, and dynamic repeated capabilities, see the topic Repeated Capabilities.

Repeated Capability | IVI-C Style | Dynamic | Physical Names
Channel | Parameter | No | Channel1 Channel2 Channel3 Channel4 Channel5 Channel6 Channel7 Channel8


Accessing Instrument-Specific Functionality

[image]

AgM9216 IVI Driver Reference Agilent Technologies
Accessing Instrument-Specific Functionality

As the name implies, the instrument-specific capabilities are those methods and properties that are unique to the instrument. In practice, the instrument-specific portion of the driver exposes the full functionality of the instrument -- including functionality that may also be available in the class-compliant capabilities. Users that do not care about interchangeability or that need to access functionality that is not defined by IVI will use the instrument-specific interfaces in application programs.

When to use the instrument specific interfaces

  • When the required functionality is not exposed in the class-compliant interfaces.
  • When interchangeability is not a requirement.
  • When performance is critical. Sometimes a driver may perform better using the instrument specific interfaces because they match the instrument functionality more closely than the class-compliant interfaces.

Example

The following example demonstrates accessing instrument-specific function on the driver. Note that instrument-specific function calls are always prefixed with the instrument-specific prefix ("AgM9216"). In contrast, calls to IVI-defined class-compliant functions are prefixed with the IVI class name.

C++ Copy image Copy Code
#include "AgM9216.h"

void main()
{
  ViStatus status;
  ViSession session;
  ViReal64 reading;

  status = AgM9216_InitWithOptions("MyLogicalName", VI_TRUE, VI_TRUE, "", &session);

  status = AgM9216_ReadEx(session, 2000, 3, &reading);

  status = AgM9216_close(session);
}

Using both the class driver and specific driver

When programming against the class driver, it is possible to get access to the specific driver session that is used internally by the class driver. This allows the client program to talk directly to the specific driver.

Example

The following client code uses the class driver and the specific driver.

C++ Copy image Copy Code
#include "AgM9216.h"
#include "IviDmm.h"

void main()
{
  ViStatus status;
  ViSession classSession;
  ViSession specificSession;
  ViReal64 reading;

  status = IviDmm_InitWithOptions("MyLogicalName", VI_TRUE, VI_TRUE, "", &classSession);

  status = IviDmm_Read(classSession, 2000, &reading);

  // Get access to the specific driver session
  status = IviDmm_GetSpecificDriverCHandle(classSession, &specificSession);

  // Call the specific driver
  // ReadEx takes an additional parameter
  // This is available only from the specific driver
  status = AgM9216_ReadEx(specificSession, 2000, 3, &reading);

  status = IviDmm_close(classSession);
}


Using Simulation

[image]

AgM9216 IVI Driver Reference Agilent Technologies
Using Simulation

An IVI driver can operate without the presence of an actual instrument by using simulation mode. When simulation is turned on, the driver performs no instrument communication, but attempts to generate results which allow client applications to reasonably execute. You can turn on simulation using either of the following two techniques:

  • Passing the "simulate=VI_TRUE" option string parameter to the InitWithOptions function.
  • Setting the SIMULATE attribute to VI_TRUE.

The IVI-C driver contains a SIMULATE attribute. Note that you can turn simulation on, if you initialize a driver with it off. However, if you initialize an IVI-COM driver with simulation turned on, you will get an error (The simulation state cannot be changed) if you attempt to later turn it off. This is because you cannot initiate a live I/O session with an instrument after you have called the InitWithOptions function.

Using The Option String

The fourth and last parameter to the InitWithOptions function is the option string. See the help on InitWithOptions for more details. To turn simulation on with the option string, include the following in the option string:

simulate=VI_TRUE

For example, the InitWithOptions call might look like this:

AgM9216_InitWithOptions("PXI54::14::0::INSTR", VI_TRUE, VI_TRUE, "Simulate=VI_TRUE", &session);

When the simulate option is set VI_TRUE, the value of the resource descriptor parameter (the first parameter above) is ignored. This is because no I/O connection will be made with the instrument, as is required by IVI-3.1: Driver Architecture Specification.

The Driver Session Simulate Attribute

A DriverSession in the IVI Configuration Store contains properties for the same items which can be set with the option string parameter. The name of a DriverSession, or the name of a LogicalName which points to a DriverSession, can be used as the first parameter to InitWithOptions. If the SIMULATE attribute in the DriverSession is true, the driver is initialized in simulation mode.

Changing the Instrument Model

Many drivers support more than one instrument model. Drivers will typically select one of these as the default model by creating a special type of entry in the IVI Configuration Store known as a Configurable Initial Settings. You can modify the Model value in the Configurable Initial Settings for the DriverSession of interest, or you can simply specify the model to simulate at runtime during the call to Initialize.

To have the driver simulate a specific model of your choosing, simply add the desired model to the DriverSetup string using the following special syntax:

Simulate=VI_TRUE, DriverSetup=Model=M9216A

The complete InitWithOptions call becomes:

AgM9216_InitWithOptions("PXI54::14::0::INSTR", VI_TRUE, VI_TRUE, "Simulate=VI_TRUE, DriverSetup= Model=M9216A", &session);

If you set the model to a value not supported by the driver, the driver reports an error.

Limitations of Simulation

Simulation is designed to allow the driver to be used without an instrument or any I/O software or hardware. However, simulation is not intended to fully emulate the instrument. There are some important differences you should be aware of:

  • Many instruments have status systems, and these are not live. For instance, you can set Enable and Transition registers but queries of Condition and Event registers will always return a fixed value, which is usually zero.
  • There often is no parameter range checking or coercion unless done in the driver. Most drivers depend on the instrument to perform range checking and coercion of parameter values. In simulation mode, this will not occur. For example setting a frequency parameter to 1E99 will be accepted without error in simulation where an instrument would return a "parameter out of range" error.
  • AgM9216_error_query typically returns no error.
  • Measurement data is not live. Most data queries will return a fixed value or a small array of values.


Programming with the IVI-C Driver in Various Development Environments

[image]

AgM9216 IVI Driver Reference Agilent Technologies
Programming with the IVI-C Driver in Various Development Environments

IVI-C drivers are implemented using standard Windows DLL technology. Consequently, IVI-C drivers can be used in a wide variety of development environments.

The topics in this section provide detailed instructions on how to access and use IVI-C drivers in a variety of popular development environments. Each topic includes a complete example of IVI-C driver usage.

In This Section

Using LabWindows™/CVI

Explains how to use the IVI-C driver in National Instruments® LabWindows/CVI.

Using LabVIEW®

Provides instructions on how to use the IVI-C driver in National Instruments LabVIEW.

Using Visual C++

Describes the process for including an IVI-C driver in a Visual C++ project.

Using .NET

Explains how to use the driver in .NET languages, such as VB.NET and C#.


Using LabWindows/CVI

[image]

AgM9216 IVI Driver Reference Agilent Technologies
Using LabWindows™/CVI

This section describes how to use an IVI-C driver from LabWindows™/CVI.

Adding the Instrument Driver to the Project

In order to access any of the driver functions, the proper header file (.h) must be included in the project and the proper import library (.lib) must be referenced. LabWindows can automatically reference these files given the location of the function panel file (.fp). The sections below explain the steps required to add the instrument driver to a LabWindows project based on the .fp file.

All IVI-C driver programs must do the following:

  • #include "AgM9216.h"
  • Link to AgM9216.lib
  • Prefix function calls with "AgM9216_"

To use the AgM9216 specific driver, perform the following steps in LabWindows.

  1. From the Edit menu, choose Add Files to Project... and select Instrument (.fp).
  2. Browse to the location of the AgM9216.fp file. The .fp file is installed in the "Drivers\AgM9216" folder of your IVI installation folder. Typically this will be something like the following:
    "C:\Program Files\IVI Foundation\IVI\Drivers\AgM9216"
  3. LabWindows adds the driver to your project and loads it automatically.

Initializing the Driver

Calling AgM9216_InitWithOptions will establish an I/O connection to an instrument (often referred to as an "I/O session") or setup the driver to work in simulation mode. Calling AgM9216_close at the end of your program is required, else unpredictable driver behavior could result. Any resources held by the driver will not be properly released if close is not called.

For more details on initializing the driver, see the topic: Initializing the Driver

Initializing Using a Resource Descriptor

The driver is typically initialized using a resource descriptor, often a VISA resource descriptor, as shown below.

C++ Copy image Copy Code
ViSession session;
ViStatus status;
status = AgM9216_InitWithOptions("PXI54::14::0::INSTR", VI_TRUE, VI_TRUE, "", &session);
status = AgM9216_close(session);

Initializing Using Options

This example shows how IVI-defined initialization options and driver-specific options can be passed to the Initialize function.

C++ Copy image Copy Code
// If true, this will query the instrument model and fail initialization
// if the model is not supported by the driver
ViBoolean idQuery = VI_FALSE;

// If true, the instrument is reset at initialization
ViBoolean reset = VI_FALSE;

// Setup IVI-defined initialization options
ViConstString standardInitOptions =
  "Cache=true, InterchangeCheck=false, QueryInstrStatus=true, RangeCheck=true, RecordCoercions=false, Simulate=false";

status = AgM9216_InitWithOptions("PXI54::14::0::INSTR", idQuery, reset, standardInitOptions, &session);
status = AgM9216_close(vi);

Accessing Attributes

Accessing attributes in an IVI-C driver is accomplished via a set of IVI-defined accessor functions. There are two accessor functions for each attribute type -- one accessor for reading attribute values and another accessor for writing attribute values.

The standard attribute accessors for reading attribute values are:

  • GetAttributeViInt32
  • GetAttributeViInt64
  • GetAttributeViReal64
  • GetAttributeViBoolean
  • GetAttributeViString

Correspondingly, the standard attribute accessors for writing attribute values are:

  • SetAttributeViInt32
  • SetAttributeViInt64
  • SetAttributeViReal64
  • SetAttributeViBoolean
  • SetAttributeViString

Each attribute accessor takes an attribute ID that uniquely identifies the attribute to access. These attribute IDs are #define'd constants listed in the AgM9216.h header file and documented in the "Attributes by Name" section of the help file.. The following example demonstrates basic usage of attribute accessors to read and write IVI-C driver attribute values.

The following code is for illustration only and may not apply directly to this driver.

C++ Copy image Copy Code
ViStatus status;

// Set the value of an attribute
status = AgM9216_SetAttributeViReal64(vi, VI_NULL, AGM9216_ATTR_FREQ_VOLTAGE_RANGE, 20.0);

// Get the value of a property
ViReal64 voltageRange;
status = AgM9216_GetAttributeViReal64(vi, VI_NULL, AGM9216_ATTR_FREQ_VOLTAGE_RANGE, &voltageRange);

// Set the value of a property (enum)
// Note use of the #define'd constant for the attribute value
status = AgM9216_SetAttributeViInt32(vi, VI_NULL, AGM9216_ATTR_TEMP_TRANSDUCER_TYPE, AGM9216_VAL_THERMOCOUPLE);

Complete Example

Complete, working example programs may be found by clicking the Windows Start Menu shortcut under:
All Programs, Agilent IVI Drivers, AgM9216, Examples

C++ Copy image Copy Code
#include "AgM9216.h"

int main (int argc, char *argv[])
{
  ViSession session;
  ViStatus status;
  ViChar str[128];
  ViInt32 ErrorCode;
  ViChar ErrorMessage[256];

  // Initialize the driver
  status = AgM9216_InitWithOptions("PXI54::14::0::INSTR", VI_TRUE, VI_TRUE, "", &session);
  if(status)
  {
    // Initialization failed
    AgM9216_GetError(session, &ErrorCode, 255, ErrorMessage);
    printf("** InitWithOptions() Error: %d, %s\n", ErrorCode, ErrorMessage);
    printf("\nDone - Press Enter to Exit");
    getchar();
    return;
  }
  printf("Driver Initialized \n");

  // Read and output a few attributes
  status = AgM9216_GetAttributeViString(session, "", AGM9216_ATTR_SPECIFIC_DRIVER_PREFIX, 127, str);
  printf("DRIVER_PREFIX:      %s\n", str);
  status = AgM9216l_GetAttributeViString(session, "", AGM9216_ATTR_SPECIFIC_DRIVER_REVISION, 127, str);
  printf("DRIVER_REVISION:    %s\n", str);
  status = AgM9216_GetAttributeViString(session, "", AGM9216_ATTR_SPECIFIC_DRIVER_VENDOR, 127, str);
  printf("DRIVER_VENDOR:      %s\n", str);
  status = AgM9216_GetAttributeViString(session, "", AGM9216_ATTR_SPECIFIC_DRIVER_DESCRIPTION, 127, str);
  printf("DRIVER_DESCRIPTION: %s\n", str);
  status = AgM9216_GetAttributeViString(session, "", AGM9216_ATTR_INSTRUMENT_MODEL, 127, str);
  printf("INSTRUMENT_MODEL:   %s\n", str);
  status = AgM9216_GetAttributeViString(session, "", AGM9216_ATTR_INSTRUMENT_FIRMWARE_REVISION, 127, str);
  printf("FIRMWARE_REVISION:  %s\n", str);

  // TODO: Exercise driver functions and attributes

  // Check instrument for errors
  ErrorCode = 1;
  printf("\n");
  while(ErrorCode)
  {
    status = AgM9216_error_query( session, &ErrorCode, ErrorMessage);
    printf("error_query: %d, %s\n", ErrorCode, ErrorMessage);
  }

  // Close the driver session
  status = AgM9216_close(session);
  if(status)
  {
    AgM9216_GetError(session, &ErrorCode, 255, ErrorMessage);
    printf("** Close() Error: %d, %s\n", ErrorCode, ErrorMessage);
  }
  else
    printf("Driver Closed \n");
}


Using LabVIEW

[image]

AgM9216 IVI Driver Reference Agilent Technologies
Using LabVIEW

LabVIEW® provides rich support for accessing both IVI-COM and IVI-C drivers. The best mechanism to use depends upon a few factors, such as whether interchangeability is required and/or if access to instrument-specific functionality is desired. This topic explains the options available.

Using the LabVIEW Class Driver VIs

LabVIEW provides IVI Class Driver VIs that can be used to write interchangeable IVI applications. If interchangeability is the overriding requirement or if only the IVI-defined functions are needed in an application, then using the LabVIEW IVI Class Driver VIs is the preferred way to access the AgM9216 driver in LabVIEW. These VIs are located on the Functions palette under Instrument I/O -> IVI Class Drivers. You can use these VIs to load and access the underlying AgM9216 IVI-C driver.

Please see the National Instruments® documentation for more details on using the IVI Class Driver VIs.

Using the LabVIEW Instrument Driver Import Wizard

National Instruments provides the LabVIEW Instrument Driver Import Wizard as a means to convert an IVI-C driver into a series of classic LabVIEW VIs arranged in standard LabVIEW menu palettes. This utility is not installed with the LabVIEW product, but it is freely available as a separate download from the National Instruments website. Unlike the IVI Class Driver VIs which only provide access to IVI-defined functions, the VIs produced by this utility provide access to the driver's instrument-specific functions. If interchangeability is not a requirement, then the LabVIEW Instrument Driver Import Wizard is a viable option.

Using the LabVIEW Class Browser

Although the import wizard produces convenient wrapper VIs for accessing the AgM9216 driver, it has some important shortcomings that should be considered when designing a LabVIEW application with IVI drivers. First, the import wizard only generates wrapper VIs for accessing IVI driver functions -- no VIs are generated for any driver attributes. Since IVI drivers typically contain more attributes than functions, this means that most of the IVI driver functionality will not be accessible via the VIs produced by the import wizard. To access the attributes of the AgM9216 driver, the LabVIEW Property Node must be used.

Another disadvantage of using the import wizard is that it generates VIs that unnecessarily call into the AgM9216 driver through the IVI-C interface instead of the native IVI-COM interface. LabVIEW provides a very convenient tool called the Class Browser for accessing the IVI-COM driver directly. This avoids the overhead of going through the IVI-C wrapper layer, and, unlike the import wizard VIs, it can be used to access functions and attributes. Also unlike the import wizard which is a separate download utility, the Class Browser is a standard feature of LabVIEW.

For these reasons, it is generally preferable to use the Class Browser feature in lieu of the import wizard when accessing instrument-specific functionality. For details on using the Class Browser to access the AgM9216 driver, please see the IVI-COM topic Using LabVIEW.


Using Visual C++

[image]

AgM9216 IVI Driver Reference Agilent Technologies
Using Visual C++

This section describes how to use an IVI-C driver from Visual C++.

Referencing the Driver

In order to access any of the driver functions, the proper header file (.h) must be included in the project and the proper import library (.lib) must be referenced. This section demonstrates usage of the driver using instrument-specific references. In order to write an interchangeable application, the NoClass class driver must be used.

All IVI-C driver programs must do the following:

  • #include "AgM9216.h"
  • Link to AgM9216.lib
  • Prefix function calls with "AgM9216_"

To use the AgM9216 specific driver, perform the following steps in Visual Studio.

  1. In solution explorer, right-click on the project and choose Properties.
  2. In the property pages dialog, expand the Linker node and select Input.
  3. In the Additional Dependencies field, enter "AgM9216.lib".
  4. Click OK.
  5. In the main application source file (.cpp), add the following line to the top of the file:

    #include "AgM9216.h"

Visual Studio must know the path to your driver's library (.lib) and header (.h) files. You can enter the following paths using the Tools, Options, Projects and Solutions, VC++ Directories dialog.

For Include Files (Win32 & x64) add: C:\Program Files (x86)\IVI Foundation\IVI\Include
For Library Files (Win32) add: C:\Program Files (x86)\IVI Foundation\IVI\Lib_\msc
For Library Files (x64) add: C:\Program Files (x86)\IVI Foundation\IVI\Lib_x64\msc
Note: For 32 bit operating systems paths start with: C:\Program Files\

Alternately, these paths may be entered in the Project Properties dialog, Configuration Properties, C++ and Linker panes.

Initializing the Driver

Calling AgM9216_InitWithOptions will establish an I/O connection to an instrument (often referred to as an "I/O session") or setup the driver to work in simulation mode. Calling AgM9216_close at the end of your program is required, else unpredictable driver behavior could result. Any resources held by the driver will not be properly released if close is not called.

For more details on initializing the driver, see the topic: Initializing the Driver

Initializing Using a Resource Descriptor

The driver is typically initialized using a resource descriptor, often a VISA resource descriptor, as shown below.

C++ Copy image Copy Code
ViSession session;
ViStatus status;
status = AgM9216_InitWithOptions("PXI54::14::0::INSTR", VI_TRUE, VI_TRUE, "", &session);
status = AgM9216_close(session);

Initializing Using Options

This example shows how IVI-defined initialization options and driver-specific options can be passed to the Initialize function.

C++ Copy image Copy Code
// If true, this will query the instrument model and fail initialization
// if the model is not supported by the driver
ViBoolean idQuery = VI_FALSE;

// If true, the instrument is reset at initialization
ViBoolean reset = VI_FALSE;

// Setup IVI-defined initialization options
ViConstString standardInitOptions =
  "Cache=true, InterchangeCheck=false, QueryInstrStatus=true, RangeCheck=true, RecordCoercions=false, Simulate=false";

status = AgM9216_InitWithOptions("PXI54::14::0::INSTR", idQuery, reset, standardInitOptions, &session);
status = AgM9216_close(vi);

Accessing Attributes

Accessing attributes in an IVI-C driver is accomplished via a set of IVI-defined accessor functions. There are two accessor functions for each attribute type -- one accessor for reading (Get) attribute values and another accessor for writing (Set) attribute values.

The standard attribute accessors for reading attribute values are:

  • GetAttributeViInt32
  • GetAttributeViInt64
  • GetAttributeViReal64
  • GetAttributeViBoolean
  • GetAttributeViString

Correspondingly, the standard attribute accessors for writing attribute values are:

  • SetAttributeViInt32
  • SetAttributeViInt64
  • SetAttributeViReal64
  • SetAttributeViBoolean
  • SetAttributeViString

Each attribute accessor takes an attribute ID that uniquely identifies the attribute to access. These attribute IDs are #define'd constants listed in the AgM9216.h header file and documented in the "Attributes by Name" section of the help file.. The following example demonstrates basic usage of attribute accessors to read and write IVI-C driver attribute values.

The following code is for illustration only and may not apply directly to this driver.

C++ Copy image Copy Code
ViStatus status;

// Set the value of an attribute
status = AgM9216_SetAttributeViReal64(vi, VI_NULL, AGM9216_ATTR_VOLTAGE_RANGE, 20.0);

// Get the value of a property
ViReal64 voltageRange;
status = AgM9216_GetAttributeViReal64(vi, VI_NULL, AGM9216_ATTR_VOLTAGE_RANGE, &voltageRange);

// Set the value of a property (enum)
// Note use of the #define'd constant for the attribute value
status = AgM9216_SetAttributeViInt32(vi, VI_NULL, AGM9216_ATTR_TEMP_TRANSDUCER_TYPE, AGM9216_VAL_THERMOCOUPLE);

Complete Example

Complete, working example programs may be found by clicking the Windows Start Menu shortcut under:
All Programs, Agilent IVI Drivers, AgM9216, Examples

C++ Copy image Copy Code
#include "AgM9216.h"

void main()
{
  ViSession session;
  ViStatus status;
  ViChar str[128];
  ViInt32 ErrorCode;
  ViChar ErrorMessage[256];

  // Initialize the driver
  status = AgM9216_InitWithOptions("PXI54::14::0::INSTR", VI_TRUE, VI_TRUE, "", &session);
  if(status)
  {
    // Initialization failed
    AgM9216_GetError(session, &ErrorCode, 255, ErrorMessage);
    printf("** InitWithOptions() Error: %d, %s\n", ErrorCode, ErrorMessage);
    printf("\nDone - Press Enter to Exit");
    getchar();
    return;
  }
  printf("Driver Initialized \n");

  // Read and output a few attributes
  status = AgM9216_GetAttributeViString(session, "", AGM9216_ATTR_SPECIFIC_DRIVER_PREFIX, 127, str);
  printf("DRIVER_PREFIX:      %s\n", str);
  status = AgM9216l_GetAttributeViString(session, "", AGM9216_ATTR_SPECIFIC_DRIVER_REVISION, 127, str);
  printf("DRIVER_REVISION:    %s\n", str);
  status = AgM9216_GetAttributeViString(session, "", AGM9216_ATTR_SPECIFIC_DRIVER_VENDOR, 127, str);
  printf("DRIVER_VENDOR:      %s\n", str);
  status = AgM9216_GetAttributeViString(session, "", AGM9216_ATTR_SPECIFIC_DRIVER_DESCRIPTION, 127, str);
  printf("DRIVER_DESCRIPTION: %s\n", str);
  status = AgM9216_GetAttributeViString(session, "", AGM9216_ATTR_INSTRUMENT_MODEL, 127, str);
  printf("INSTRUMENT_MODEL:   %s\n", str);
  status = AgM9216_GetAttributeViString(session, "", AGM9216_ATTR_INSTRUMENT_FIRMWARE_REVISION, 127, str);
  printf("FIRMWARE_REVISION:  %s\n", str);

  // TODO: Exercise driver functions and attributes

  // Check instrument for errors
  ErrorCode = 1;
  printf("\n");
  while(ErrorCode)
  {
    status = AgM9216_error_query( session, &ErrorCode, ErrorMessage);
    printf("error_query: %d, %s\n", ErrorCode, ErrorMessage);
  }

  // Close the driver session
  status = AgM9216_close(session);
  if(status)
  {
    AgM9216_GetError(session, &ErrorCode, 255, ErrorMessage);
    printf("** Close() Error: %d, %s\n", ErrorCode, ErrorMessage);
  }
  else
    printf("Driver Closed \n");
}


Using .NET

[image]

AgM9216 IVI Driver Reference Agilent Technologies
Using .NET

There is no standard mechanism for accessing an IVI-C driver in .NET languages. Though the Microsoft .NET framework provides the [DllImport] attribute as a means to access any DLL function, its use is not standardized within IVI and it is very tedious and error prone in practice.

However, since the AgM9216 driver is built upon an IVI-COM core driver, the best way to access the driver from .NET languages is via the .NET interop assembly provided with the driver. The interop assemblies directly accesses the IVI-COM driver (bypassing the IVI-C wrapper layer) and provide a way to author interchangeable .NET applications as well as instrument-specific applications that utility specialized driver features.

For details on using the AgM9216 driver in .NET applications, see the IVI-COM topic Using C#.


Using MATLAB

[image]

AgM9216 IVI Driver Reference Agilent Technologies
Using MATLAB®

Although MATLAB® provides support for accessing conventional Windows DLLs, such as IVI-C drivers, the AgM9216 driver includes a MATLAB wrapper that provides the most convenient way to access the AgM9216 driver. This wrapper directly accesses the underlying IVI-COM core driver, so the overhead of going through the AgM9216 driver's IVI-C wrapper layer is avoided.

For details on using the AgM9216 driver in MATLAB, please see the IVI-COM topic Using MATLAB.


Reference

[image]

AgM9216 IVI Driver Reference Agilent Technologies
Reference

The topics in this section document each function and attribute exposed from the IVI-C driver. Functions and attributes are presented in a hierarchical function tree as well as in a flat list by name.

In This Section

Hierarchy

Presents a hierarchical view of all driver functions and attributes.

Functions and Attributes

Displays the IVI-C functions and attributes together in a flat list.

Functions By Name

Lists all IVI-C functions sorted alphabetically by name.

Attributes By Name

Lists all IVI-C attributes sorted alphabetically by name.

Errors and Warnings

Presents all driver errors and warnings ordered by error code.


AgM9216

[image]

AgM9216 IVI Driver Reference Agilent Technologies
AgM9216
See Also

Tree Node: \AgM9216

Branches

Name
Attribute Accessors
Inherent IVI Attributes
Instrument Specific
Utility
Top

Functions

 | Name | Description
Function | Close | Closes the I/O session to the instrument. Driver methods and properties that access the instrument are not accessible after Close is called.
Function | Initialize | Opens the I/O session to the instrument. Driver methods and properties that access the instrument are only accessible after Initialize is called. Initialize optionally performs a Reset and queries the instrument to validate the instrument model.
Function | Initialize With Options | Opens the I/O session to the instrument. Driver methods and properties that access the instrument are only accessible after Initialize is called. Initialize optionally performs a Reset and queries the instrument to validate the instrument model.
Top

See Also

Reference

AgM9216


Attribute Accessors

[image]

AgM9216 IVI Driver Reference Agilent Technologies
Attribute Accessors
See Also

Tree Node: \AgM9216\Attribute Accessors

Functions

 | Name | Description
Function | GetAttributeViBoolean | This routine is used to access low-level settings of the instrument. See the attributeID parameter for a link to all attributes of the instrument.
Function | GetAttributeViInt32 | This routine is used to access low-level settings of the instrument. See the attributeID parameter for a link to all attributes of the instrument.
Function | GetAttributeViReal64 | This routine is used to access low-level settings of the instrument. See the attributeID parameter for a link to all attributes of the instrument.
Function | GetAttributeViSession | This routine is used to access low-level settings of the instrument. See the attributeID parameter for a link to all attributes of the instrument.
Function | GetAttributeViString | This routine is used to access low-level settings of the instrument. See the attributeID parameter for a link to all attributes of the instrument.
Function | SetAttributeViBoolean | This routine is used to access low-level settings of the instrument. See the attributeID parameter for a link to all attributes of the instrument.
Function | SetAttributeViInt32 | This routine is used to access low-level settings of the instrument. See the attributeID parameter for a link to all attributes of the instrument.
Function | SetAttributeViReal64 | This routine is used to access low-level settings of the instrument. See the attributeID parameter for a link to all attributes of the instrument.
Function | SetAttributeViSession | This routine is used to access low-level settings of the instrument. See the attributeID parameter for a link to all attributes of the instrument.
Function | SetAttributeViString | This routine is used to access low-level settings of the instrument. See the attributeID parameter for a link to all attributes of the instrument.
Top

See Also

Reference

AgM9216


AgM9216_GetAttributeViBoolean Function

[image]

AgM9216 IVI Driver Reference Agilent Technologies
AgM9216_GetAttributeViBoolean Function
Attribute Accessors See Also

This routine is used to access low-level settings of the instrument. See the attributeID parameter for a link to all attributes of the instrument.

Function Tree Node: \AgM9216\Attribute Accessors\GetAttributeViBoolean
Declaration: AgM9216.h
Implementation: AgM9216.dll

Syntax

Visual C++
ViStatus AgM9216_GetAttributeViBoolean(
    ViSession Vi,
    ViConstString RepCapIdentifier,
    ViAttr AttributeID,
    ViBoolean* AttributeValue
);

Parameters

Vi

The ViSession handle that you obtain from the IviDriver_init or IviDriver_InitWithOptions function. The handle identifies a particular instrument session.

RepCapIdentifier

If the attribute applies to a repeated capability, the user passes a physical or virtual repeated capability identifier. Otherwise, the user passes VI_NULL or an empty string. For attributes requiring nested repeated capabilities, enter the names separated by a colon as in: "Window1:Trace2".

AttributeID

The ID of the attribute. The valid values for this parameter can be found in the driver header file.

AttributeValue

Returns the current value of the attribute. The user must specify the address of a variable that has the same data type as the attribute.

Return Value

Success or failure code.

See Also

Reference

Attribute Accessors
AgM9216


AgM9216_GetAttributeViInt32 Function

[image]

AgM9216 IVI Driver Reference Agilent Technologies
AgM9216_GetAttributeViInt32 Function
Attribute Accessors See Also

This routine is used to access low-level settings of the instrument. See the attributeID parameter for a link to all attributes of the instrument.

Function Tree Node: \AgM9216\Attribute Accessors\GetAttributeViInt32
Declaration: AgM9216.h
Implementation: AgM9216.dll

Syntax

Visual C++
ViStatus AgM9216_GetAttributeViInt32(
    ViSession Vi,
    ViConstString RepCapIdentifier,
    ViAttr AttributeID,
    ViInt32* AttributeValue
);

Parameters

Vi

The ViSession handle that you obtain from the IviDriver_init or IviDriver_InitWithOptions function. The handle identifies a particular instrument session.

RepCapIdentifier

If the attribute applies to a repeated capability, the user passes a physical or virtual repeated capability identifier. Otherwise, the user passes VI_NULL or an empty string. For attributes requiring nested repeated capabilities, enter the names separated by a colon as in: "Window1:Trace2".

AttributeID

The ID of the attribute. The valid values for this parameter can be found in the driver header file.

AttributeValue

Returns the current value of the attribute. The user must specify the address of a variable that has the same data type as the attribute.

Return Value

Success or failure code.

See Also

Reference

Attribute Accessors
AgM9216


AgM9216_GetAttributeViReal64 Function

[image]

AgM9216 IVI Driver Reference Agilent Technologies
AgM9216_GetAttributeViReal64 Function
Attribute Accessors See Also

This routine is used to access low-level settings of the instrument. See the attributeID parameter for a link to all attributes of the instrument.

Function Tree Node: \AgM9216\Attribute Accessors\GetAttributeViReal64
Declaration: AgM9216.h
Implementation: AgM9216.dll

Syntax

Visual C++
ViStatus AgM9216_GetAttributeViReal64(
    ViSession Vi,
    ViConstString RepCapIdentifier,
    ViAttr AttributeID,
    ViReal64* AttributeValue
);

Parameters

Vi

The ViSession handle that you obtain from the IviDriver_init or IviDriver_InitWithOptions function. The handle identifies a particular instrument session.

RepCapIdentifier

If the attribute applies to a repeated capability, the user passes a physical or virtual repeated capability identifier. Otherwise, the user passes VI_NULL or an empty string. For attributes requiring nested repeated capabilities, enter the names separated by a colon as in: "Window1:Trace2".

AttributeID

The ID of the attribute. The valid values for this parameter can be found in the driver header file.

AttributeValue

Returns the current value of the attribute. The user must specify the address of a variable that has the same data type as the attribute.

Return Value

Success or failure code.

See Also

Reference

Attribute Accessors
AgM9216


AgM9216_GetAttributeViSession Function

[image]

AgM9216 IVI Driver Reference Agilent Technologies
AgM9216_GetAttributeViSession Function
Attribute Accessors See Also

This routine is used to access low-level settings of the instrument. See the attributeID parameter for a link to all attributes of the instrument.

Function Tree Node: \AgM9216\Attribute Accessors\GetAttributeViSession
Declaration: AgM9216.h
Implementation: AgM9216.dll

Syntax

Visual C++
ViStatus AgM9216_GetAttributeViSession(
    ViSession Vi,
    ViConstString RepCapIdentifier,
    ViAttr AttributeID,
    ViSession* AttributeValue
);

Parameters

Vi

The ViSession handle that you obtain from the IviDriver_init or IviDriver_InitWithOptions function. The handle identifies a particular instrument session.

RepCapIdentifier

If the attribute applies to a repeated capability, the user passes a physical or virtual repeated capability identifier. Otherwise, the user passes VI_NULL or an empty string. For attributes requiring nested repeated capabilities, enter the names separated by a colon as in: "Window1:Trace2".

AttributeID

The ID of the attribute. The valid values for this parameter can be found in the driver header file.

AttributeValue

Returns the current value of the attribute. The user must specify the address of a variable that has the same data type as the attribute.

Return Value

Success or failure code.

See Also

Reference

Attribute Accessors
AgM9216


AgM9216_GetAttributeViString Function

[image]

AgM9216 IVI Driver Reference Agilent Technologies
AgM9216_GetAttributeViString Function
Attribute Accessors See Also

This routine is used to access low-level settings of the instrument. See the attributeID parameter for a link to all attributes of the instrument.

Function Tree Node: \AgM9216\Attribute Accessors\GetAttributeViString
Declaration: AgM9216.h
Implementation: AgM9216.dll

Syntax

Visual C++
ViStatus AgM9216_GetAttributeViString(
    ViSession Vi,
    ViConstString RepCapIdentifier,
    ViAttr AttributeID,
    ViInt32 AttributeValueBufferSize,
    ViChar[] AttributeValue
);

Parameters

Vi

The ViSession handle that you obtain from the IviDriver_init or IviDriver_InitWithOptions function. The handle identifies a particular instrument session.

RepCapIdentifier

If the attribute applies to a repeated capability, the user passes a physical or virtual repeated capability identifier. Otherwise, the user passes VI_NULL or an empty string. For attributes requiring nested repeated capabilities, enter the names separated by a colon as in: "Window1:Trace2".

AttributeID

The ID of the attribute. The valid values for this parameter can be found in the driver header file.

AttributeValueBufferSize

The number of bytes in the ViChar array that the user specifies for the AttributeValue parameter.

AttributeValue

The buffer in which the function returns the current value of the attribute. Can be VI_NULL if AttributeValueBufferSize is 0.

Return Value

Success or failure code.

See Also

Reference

Attribute Accessors
AgM9216


AgM9216_SetAttributeViBoolean Function

[image]

AgM9216 IVI Driver Reference Agilent Technologies
AgM9216_SetAttributeViBoolean Function
Attribute Accessors See Also

This routine is used to access low-level settings of the instrument. See the attributeID parameter for a link to all attributes of the instrument.

Function Tree Node: \AgM9216\Attribute Accessors\SetAttributeViBoolean
Declaration: AgM9216.h
Implementation: AgM9216.dll

Syntax

Visual C++
ViStatus AgM9216_SetAttributeViBoolean(
    ViSession Vi,
    ViConstString RepCapIdentifier,
    ViAttr AttributeID,
    ViBoolean AttributeValue
);

Parameters

Vi

The ViSession handle that you obtain from the IviDriver_init or IviDriver_InitWithOptions function. The handle identifies a particular instrument session.

RepCapIdentifier

If the attribute applies to a repeated capability, the user passes a physical or virtual repeated capability identifier. Otherwise, the user passes VI_NULL or an empty string. For attributes requiring nested repeated capabilities, enter the names separated by a colon as in: "Window1:Trace2".

AttributeID

The ID of the attribute. The valid values for this parameter can be found in the driver header file.

AttributeValue

The value to which to set the attribute.

Return Value

Success or failure code.

See Also

Reference

Attribute Accessors
AgM9216


AgM9216_SetAttributeViInt32 Function

[image]

AgM9216 IVI Driver Reference Agilent Technologies
AgM9216_SetAttributeViInt32 Function
Attribute Accessors See Also

This routine is used to access low-level settings of the instrument. See the attributeID parameter for a link to all attributes of the instrument.

Function Tree Node: \AgM9216\Attribute Accessors\SetAttributeViInt32
Declaration: AgM9216.h
Implementation: AgM9216.dll

Syntax

Visual C++
ViStatus AgM9216_SetAttributeViInt32(
    ViSession Vi,
    ViConstString RepCapIdentifier,
    ViAttr AttributeID,
    ViInt32 AttributeValue
);

Parameters

Vi

The ViSession handle that you obtain from the IviDriver_init or IviDriver_InitWithOptions function. The handle identifies a particular instrument session.

RepCapIdentifier

If the attribute applies to a repeated capability, the user passes a physical or virtual repeated capability identifier. Otherwise, the user passes VI_NULL or an empty string. For attributes requiring nested repeated capabilities, enter the names separated by a colon as in: "Window1:Trace2".

AttributeID

The ID of the attribute. The valid values for this parameter can be found in the driver header file.

AttributeValue

The value to which to set the attribute.

Return Value

Success or failure code.

See Also

Reference

Attribute Accessors
AgM9216


AgM9216_SetAttributeViReal64 Function

[image]

AgM9216 IVI Driver Reference Agilent Technologies
AgM9216_SetAttributeViReal64 Function
Attribute Accessors See Also

This routine is used to access low-level settings of the instrument. See the attributeID parameter for a link to all attributes of the instrument.

Function Tree Node: \AgM9216\Attribute Accessors\SetAttributeViReal64
Declaration: AgM9216.h
Implementation: AgM9216.dll

Syntax

Visual C++
ViStatus AgM9216_SetAttributeViReal64(
    ViSession Vi,
    ViConstString RepCapIdentifier,
    ViAttr AttributeID,
    ViReal64 AttributeValue
);

Parameters

Vi

The ViSession handle that you obtain from the IviDriver_init or IviDriver_InitWithOptions function. The handle identifies a particular instrument session.

RepCapIdentifier

If the attribute applies to a repeated capability, the user passes a physical or virtual repeated capability identifier. Otherwise, the user passes VI_NULL or an empty string. For attributes requiring nested repeated capabilities, enter the names separated by a colon as in: "Window1:Trace2".

AttributeID

The ID of the attribute. The valid values for this parameter can be found in the driver header file.

AttributeValue

The value to which to set the attribute.

Return Value

Success or failure code.

See Also

Reference

Attribute Accessors
AgM9216


AgM9216_SetAttributeViSession Function

[image]

AgM9216 IVI Driver Reference Agilent Technologies
AgM9216_SetAttributeViSession Function
Attribute Accessors See Also

This routine is used to access low-level settings of the instrument. See the attributeID parameter for a link to all attributes of the instrument.

Function Tree Node: \AgM9216\Attribute Accessors\SetAttributeViSession
Declaration: AgM9216.h
Implementation: AgM9216.dll

Syntax

Visual C++
ViStatus AgM9216_SetAttributeViSession(
    ViSession Vi,
    ViConstString RepCapIdentifier,
    ViAttr AttributeID,
    ViSession AttributeValue
);

Parameters

Vi

The ViSession handle that you obtain from the IviDriver_init or IviDriver_InitWithOptions function. The handle identifies a particular instrument session.

RepCapIdentifier

If the attribute applies to a repeated capability, the user passes a physical or virtual repeated capability identifier. Otherwise, the user passes VI_NULL or an empty string. For attributes requiring nested repeated capabilities, enter the names separated by a colon as in: "Window1:Trace2".

AttributeID

The ID of the attribute. The valid values for this parameter can be found in the driver header file.

AttributeValue

The value to which to set the attribute.

Return Value

Success or failure code.

See Also

Reference

Attribute Accessors
AgM9216


AgM9216_SetAttributeViString Function

[image]

AgM9216 IVI Driver Reference Agilent Technologies
AgM9216_SetAttributeViString Function
Attribute Accessors See Also

This routine is used to access low-level settings of the instrument. See the attributeID parameter for a link to all attributes of the instrument.

Function Tree Node: \AgM9216\Attribute Accessors\SetAttributeViString
Declaration: AgM9216.h
Implementation: AgM9216.dll

Syntax

Visual C++
ViStatus AgM9216_SetAttributeViString(
    ViSession Vi,
    ViConstString RepCapIdentifier,
    ViAttr AttributeID,
    ViConstString AttributeValue
);

Parameters

Vi

The ViSession handle that you obtain from the IviDriver_init or IviDriver_InitWithOptions function. The handle identifies a particular instrument session.

RepCapIdentifier

If the attribute applies to a repeated capability, the user passes a physical or virtual repeated capability identifier. Otherwise, the user passes VI_NULL or an empty string. For attributes requiring nested repeated capabilities, enter the names separated by a colon as in: "Window1:Trace2".

AttributeID

The ID of the attribute. The valid values for this parameter can be found in the driver header file.

AttributeValue

The value to which to set the attribute.

Return Value

Success or failure code.

See Also

Reference

Attribute Accessors
AgM9216


AgM9216_close Function

[image]

AgM9216 IVI Driver Reference Agilent Technologies
AgM9216_close Function
AgM9216 See Also

Closes the I/O session to the instrument. Driver methods and properties that access the instrument are not accessible after Close is called.

Function Tree Node: \AgM9216\Close
Declaration: AgM9216.h
Implementation: AgM9216.dll

Syntax

Visual C++
ViStatus AgM9216_close(
    ViSession Vi
);

Parameters

Vi

The ViSession handle that you obtain from the IviDriver_init or IviDriver_InitWithOptions function. The handle identifies a particular instrument session.

Return Value

Success or failure code.

See Also

Reference

AgM9216
AgM9216


Inherent IVI Attributes

[image]

AgM9216 IVI Driver Reference Agilent Technologies
Inherent IVI Attributes
See Also

Tree Node: \AgM9216\Inherent IVI Attributes

Branches

Name
Advanced Session Information
Driver Capabilities
Driver Identification
Instrument Identification
User Options
Top

See Also

Reference

AgM9216


Advanced Session Information

[image]

AgM9216 IVI Driver Reference Agilent Technologies
Advanced Session Information
See Also

Tree Node: \AgM9216\Inherent IVI Attributes\Advanced Session Information

Attributes

 | Name | Description
Attribute | Driver Setup | The driver setup string. It is either specified in the Configuration Store or passed in the OptionString parameter of the Initialize function. Driver setup is empty if the driver is not initialized.
Attribute | I/O Resource Descriptor | The resource descriptor specifies the connection to a physical device. It is either specified in the Configuration Store or passed in the ResourceName parameter of the Initialize function. It is empty if the driver is not initialized.
Attribute | Logical Name | Logical Name identifies a driver session in the Configuration Store. If Logical Name is not empty, the driver was initialized from information in the driver session. If it is empty, the driver was initialized without using the Configuration Store.
Top

See Also

Reference

AgM9216


AGM9216_ATTR_DRIVER_SETUP Attribute

[image]

AgM9216 IVI Driver Reference Agilent Technologies
AGM9216_ATTR_DRIVER_SETUP Attribute
Advanced Session Information See Also

The driver setup string. It is either specified in the Configuration Store or passed in the OptionString parameter of the Initialize function. Driver setup is empty if the driver is not initialized.

Attribute Tree Node: \AgM9216\Inherent IVI Attributes\Advanced Session Information\Driver Setup
Declaration: AgM9216.h
Implementation: AgM9216.dll

Syntax

Visual C++
#define AGM9216_ATTR_DRIVER_SETUP 1050007

ViStatus AgM9216_GetAttributeViString(
    ViSession Vi,
    ViConstString RepCapIdentifier,
    ViAttr AttributeID,
    ViInt32 AttributeValueBufferSize,
    ViChar[] AttributeValue
);

Parameters

Vi

The ViSession handle that you obtain from the IviDriver_init or IviDriver_InitWithOptions function. The handle identifies a particular instrument session.

RepCapIdentifier

Must be VI_NULL or an empty string. This attribute is not defined on a repeated capability.

AttributeID

Must be AGM9216_ATTR_DRIVER_SETUP.

AttributeValueBufferSize

The number of bytes in the ViChar array that the user specifies for the AttributeValue parameter.

AttributeValue

The buffer in which the function returns the current value of the attribute. Can be VI_NULL if AttributeValueBufferSize is 0.

See Also

Reference

Advanced Session Information
AgM9216


AGM9216_ATTR_IO_RESOURCE_DESCRIPTOR Attribute

[image]

AgM9216 IVI Driver Reference Agilent Technologies
AGM9216_ATTR_IO_RESOURCE_DESCRIPTOR Attribute
Advanced Session Information See Also

The resource descriptor specifies the connection to a physical device. It is either specified in the Configuration Store or passed in the ResourceName parameter of the Initialize function. It is empty if the driver is not initialized.

Attribute Tree Node: \AgM9216\Inherent IVI Attributes\Advanced Session Information\I/O Resource Descriptor
Declaration: AgM9216.h
Implementation: AgM9216.dll

Syntax

Visual C++
#define AGM9216_ATTR_IO_RESOURCE_DESCRIPTOR 1050304

ViStatus AgM9216_GetAttributeViString(
    ViSession Vi,
    ViConstString RepCapIdentifier,
    ViAttr AttributeID,
    ViInt32 AttributeValueBufferSize,
    ViChar[] AttributeValue
);

Parameters

Vi

The ViSession handle that you obtain from the IviDriver_init or IviDriver_InitWithOptions function. The handle identifies a particular instrument session.

RepCapIdentifier

Must be VI_NULL or an empty string. This attribute is not defined on a repeated capability.

AttributeID

Must be AGM9216_ATTR_IO_RESOURCE_DESCRIPTOR.

AttributeValueBufferSize

The number of bytes in the ViChar array that the user specifies for the AttributeValue parameter.

AttributeValue

The buffer in which the function returns the current value of the attribute. Can be VI_NULL if AttributeValueBufferSize is 0.

See Also

Reference

Advanced Session Information
AgM9216


AGM9216_ATTR_LOGICAL_NAME Attribute

[image]

AgM9216 IVI Driver Reference Agilent Technologies
AGM9216_ATTR_LOGICAL_NAME Attribute
Advanced Session Information See Also

Logical Name identifies a driver session in the Configuration Store. If Logical Name is not empty, the driver was initialized from information in the driver session. If it is empty, the driver was initialized without using the Configuration Store.

Attribute Tree Node: \AgM9216\Inherent IVI Attributes\Advanced Session Information\Logical Name
Declaration: AgM9216.h
Implementation: AgM9216.dll

Syntax

Visual C++
#define AGM9216_ATTR_LOGICAL_NAME 1050305

ViStatus AgM9216_GetAttributeViString(
    ViSession Vi,
    ViConstString RepCapIdentifier,
    ViAttr AttributeID,
    ViInt32 AttributeValueBufferSize,
    ViChar[] AttributeValue
);

Parameters

Vi

The ViSession handle that you obtain from the IviDriver_init or IviDriver_InitWithOptions function. The handle identifies a particular instrument session.

RepCapIdentifier

Must be VI_NULL or an empty string. This attribute is not defined on a repeated capability.

AttributeID

Must be AGM9216_ATTR_LOGICAL_NAME.

AttributeValueBufferSize

The number of bytes in the ViChar array that the user specifies for the AttributeValue parameter.

AttributeValue

The buffer in which the function returns the current value of the attribute. Can be VI_NULL if AttributeValueBufferSize is 0.

See Also

Reference

Advanced Session Information
AgM9216


Driver Capabilities

[image]

AgM9216 IVI Driver Reference Agilent Technologies
Driver Capabilities
See Also

Tree Node: \AgM9216\Inherent IVI Attributes\Driver Capabilities

Attributes

 | Name | Description
Attribute | Class Group Capabilities | A comma-separated list of the class capability groups implemented by the driver. Capability group names are documented in the IVI class specifications. If the driver is not class compliant, the driver returns an empty string.
Attribute | Supported Instrument Models | A comma-separated list of instrument models that the IVI specific driver can control. The string does not include an abbreviation for the manufacturer if it is the same for all models.
Top

See Also

Reference

AgM9216


AGM9216_ATTR_GROUP_CAPABILITIES Attribute

[image]

AgM9216 IVI Driver Reference Agilent Technologies
AGM9216_ATTR_GROUP_CAPABILITIES Attribute
Driver Capabilities See Also

A comma-separated list of the class capability groups implemented by the driver. Capability group names are documented in the IVI class specifications. If the driver is not class compliant, the driver returns an empty string.

Attribute Tree Node: \AgM9216\Inherent IVI Attributes\Driver Capabilities\Class Group Capabilities
Declaration: AgM9216.h
Implementation: AgM9216.dll

Syntax

Visual C++
#define AGM9216_ATTR_GROUP_CAPABILITIES 1050401

ViStatus AgM9216_GetAttributeViString(
    ViSession Vi,
    ViConstString RepCapIdentifier,
    ViAttr AttributeID,
    ViInt32 AttributeValueBufferSize,
    ViChar[] AttributeValue
);

Parameters

Vi

The ViSession handle that you obtain from the IviDriver_init or IviDriver_InitWithOptions function. The handle identifies a particular instrument session.

RepCapIdentifier

Must be VI_NULL or an empty string. This attribute is not defined on a repeated capability.

AttributeID

Must be AGM9216_ATTR_GROUP_CAPABILITIES.

AttributeValueBufferSize

The number of bytes in the ViChar array that the user specifies for the AttributeValue parameter.

AttributeValue

The buffer in which the function returns the current value of the attribute. Can be VI_NULL if AttributeValueBufferSize is 0.

See Also

Reference

Driver Capabilities
AgM9216


AGM9216_ATTR_SUPPORTED_INSTRUMENT_MODELS Attribute

[image]

AgM9216 IVI Driver Reference Agilent Technologies
AGM9216_ATTR_SUPPORTED_INSTRUMENT_MODELS Attribute
Driver Capabilities See Also

A comma-separated list of instrument models that the IVI specific driver can control. The string does not include an abbreviation for the manufacturer if it is the same for all models.

Attribute Tree Node: \AgM9216\Inherent IVI Attributes\Driver Capabilities\Supported Instrument Models
Declaration: AgM9216.h
Implementation: AgM9216.dll

Syntax

Visual C++
#define AGM9216_ATTR_SUPPORTED_INSTRUMENT_MODELS 1050327

ViStatus AgM9216_GetAttributeViString(
    ViSession Vi,
    ViConstString RepCapIdentifier,
    ViAttr AttributeID,
    ViInt32 AttributeValueBufferSize,
    ViChar[] AttributeValue
);

Parameters

Vi

The ViSession handle that you obtain from the IviDriver_init or IviDriver_InitWithOptions function. The handle identifies a particular instrument session.

RepCapIdentifier

Must be VI_NULL or an empty string. This attribute is not defined on a repeated capability.

AttributeID

Must be AGM9216_ATTR_SUPPORTED_INSTRUMENT_MODELS.

AttributeValueBufferSize

The number of bytes in the ViChar array that the user specifies for the AttributeValue parameter.

AttributeValue

The buffer in which the function returns the current value of the attribute. Can be VI_NULL if AttributeValueBufferSize is 0.

See Also

Reference

Driver Capabilities
AgM9216


Driver Identification

[image]

AgM9216 IVI Driver Reference Agilent Technologies
Driver Identification
See Also

Tree Node: \AgM9216\Inherent IVI Attributes\Driver Identification

Attributes

 | Name | Description
Attribute | Specific Driver Class Spec Major Version | Returns the major version number of the class specification in accordance with which the IVI specific driver was developed. Zero is returned if the driver is not compliant with a class specification.
Attribute | Specific Driver Class Spec Minor Version | Returns the minor version number of the class specification in accordance with which the IVI specific driver was developed. Zero is returned if the driver is not compliant with a class specification.
Attribute | Specific Driver Description | Returns a brief description of the IVI specific driver. The string that this attribute returns contains a maximum of 256 bytes including the NUL byte.
Attribute | Specific Driver Prefix | Returns the case-sensitive prefix of the user-callable functions that the IVI-C specific driver exports. The string that this attribute returns contains a maximum of 32 bytes including the NUL byte.
Attribute | Specific Driver Revision | Returns version information about the IVI specific driver. The string that this attribute returns contains a maximum of 256 bytes including the NUL byte.
Attribute | Specific Driver Vendor | Returns the name of the vendor that supplies the IVI specific driver. The string that this attribute returns contains a maximum of 256 bytes including the NUL byte.
Top

See Also

Reference

AgM9216


AGM9216_ATTR_SPECIFIC_DRIVER_CLASS_SPEC_MAJOR_VERSION Attribute

[image]

AgM9216 IVI Driver Reference Agilent Technologies
AGM9216_ATTR_SPECIFIC_DRIVER_CLASS_SPEC_MAJOR_VERSION Attribute
Driver Identification See Also

Returns the major version number of the class specification in accordance with which the IVI specific driver was developed. Zero is returned if the driver is not compliant with a class specification.

Attribute Tree Node: \AgM9216\Inherent IVI Attributes\Driver Identification\Specific Driver Class Spec Major Version
Declaration: AgM9216.h
Implementation: AgM9216.dll

Syntax

Visual C++
#define AGM9216_ATTR_SPECIFIC_DRIVER_CLASS_SPEC_MAJOR_VERSION 1050515

ViStatus AgM9216_GetAttributeViInt32(
    ViSession Vi,
    ViConstString RepCapIdentifier,
    ViAttr AttributeID,
    ViInt32* AttributeValue
);

Parameters

Vi

The ViSession handle that you obtain from the IviDriver_init or IviDriver_InitWithOptions function. The handle identifies a particular instrument session.

RepCapIdentifier

Must be VI_NULL or an empty string. This attribute is not defined on a repeated capability.

AttributeID

Must be AGM9216_ATTR_SPECIFIC_DRIVER_CLASS_SPEC_MAJOR_VERSION.

AttributeValue

Returns the current value of the attribute. The user must specify the address of a variable that has the same data type as the attribute.

See Also

Reference

Driver Identification
AgM9216


AGM9216_ATTR_SPECIFIC_DRIVER_CLASS_SPEC_MINOR_VERSION Attribute

[image]

AgM9216 IVI Driver Reference Agilent Technologies
AGM9216_ATTR_SPECIFIC_DRIVER_CLASS_SPEC_MINOR_VERSION Attribute
Driver Identification See Also

Returns the minor version number of the class specification in accordance with which the IVI specific driver was developed. Zero is returned if the driver is not compliant with a class specification.

Attribute Tree Node: \AgM9216\Inherent IVI Attributes\Driver Identification\Specific Driver Class Spec Minor Version
Declaration: AgM9216.h
Implementation: AgM9216.dll

Syntax

Visual C++
#define AGM9216_ATTR_SPECIFIC_DRIVER_CLASS_SPEC_MINOR_VERSION 1050516

ViStatus AgM9216_GetAttributeViInt32(
    ViSession Vi,
    ViConstString RepCapIdentifier,
    ViAttr AttributeID,
    ViInt32* AttributeValue
);

Parameters

Vi

The ViSession handle that you obtain from the IviDriver_init or IviDriver_InitWithOptions function. The handle identifies a particular instrument session.

RepCapIdentifier

Must be VI_NULL or an empty string. This attribute is not defined on a repeated capability.

AttributeID

Must be AGM9216_ATTR_SPECIFIC_DRIVER_CLASS_SPEC_MINOR_VERSION.

AttributeValue

Returns the current value of the attribute. The user must specify the address of a variable that has the same data type as the attribute.

See Also

Reference

Driver Identification
AgM9216


AGM9216_ATTR_SPECIFIC_DRIVER_DESCRIPTION Attribute

[image]

AgM9216 IVI Driver Reference Agilent Technologies
AGM9216_ATTR_SPECIFIC_DRIVER_DESCRIPTION Attribute
Driver Identification See Also

Returns a brief description of the IVI specific driver. The string that this attribute returns contains a maximum of 256 bytes including the NUL byte.

Attribute Tree Node: \AgM9216\Inherent IVI Attributes\Driver Identification\Specific Driver Description
Declaration: AgM9216.h
Implementation: AgM9216.dll

Syntax

Visual C++
#define AGM9216_ATTR_SPECIFIC_DRIVER_DESCRIPTION 1050514

ViStatus AgM9216_GetAttributeViString(
    ViSession Vi,
    ViConstString RepCapIdentifier,
    ViAttr AttributeID,
    ViInt32 AttributeValueBufferSize,
    ViChar[] AttributeValue
);

Parameters

Vi

The ViSession handle that you obtain from the IviDriver_init or IviDriver_InitWithOptions function. The handle identifies a particular instrument session.

RepCapIdentifier

Must be VI_NULL or an empty string. This attribute is not defined on a repeated capability.

AttributeID

Must be AGM9216_ATTR_SPECIFIC_DRIVER_DESCRIPTION.

AttributeValueBufferSize

The number of bytes in the ViChar array that the user specifies for the AttributeValue parameter.

AttributeValue

The buffer in which the function returns the current value of the attribute. Can be VI_NULL if AttributeValueBufferSize is 0.

See Also

Reference

Driver Identification
AgM9216


AGM9216_ATTR_SPECIFIC_DRIVER_PREFIX Attribute

[image]

AgM9216 IVI Driver Reference Agilent Technologies
AGM9216_ATTR_SPECIFIC_DRIVER_PREFIX Attribute
Driver Identification See Also

Returns the case-sensitive prefix of the user-callable functions that the IVI-C specific driver exports. The string that this attribute returns contains a maximum of 32 bytes including the NUL byte.

Attribute Tree Node: \AgM9216\Inherent IVI Attributes\Driver Identification\Specific Driver Prefix
Declaration: AgM9216.h
Implementation: AgM9216.dll

Syntax

Visual C++
#define AGM9216_ATTR_SPECIFIC_DRIVER_PREFIX 1050302

ViStatus AgM9216_GetAttributeViString(
    ViSession Vi,
    ViConstString RepCapIdentifier,
    ViAttr AttributeID,
    ViInt32 AttributeValueBufferSize,
    ViChar[] AttributeValue
);

Parameters

Vi

The ViSession handle that you obtain from the IviDriver_init or IviDriver_InitWithOptions function. The handle identifies a particular instrument session.

RepCapIdentifier

Must be VI_NULL or an empty string. This attribute is not defined on a repeated capability.

AttributeID

Must be AGM9216_ATTR_SPECIFIC_DRIVER_PREFIX.

AttributeValueBufferSize

The number of bytes in the ViChar array that the user specifies for the AttributeValue parameter.

AttributeValue

The buffer in which the function returns the current value of the attribute. Can be VI_NULL if AttributeValueBufferSize is 0.

See Also

Reference

Driver Identification
AgM9216


AGM9216_ATTR_SPECIFIC_DRIVER_REVISION Attribute

[image]

AgM9216 IVI Driver Reference Agilent Technologies
AGM9216_ATTR_SPECIFIC_DRIVER_REVISION Attribute
Driver Identification See Also

Returns version information about the IVI specific driver. The string that this attribute returns contains a maximum of 256 bytes including the NUL byte.

Attribute Tree Node: \AgM9216\Inherent IVI Attributes\Driver Identification\Specific Driver Revision
Declaration: AgM9216.h
Implementation: AgM9216.dll

Syntax

Visual C++
#define AGM9216_ATTR_SPECIFIC_DRIVER_REVISION 1050551

ViStatus AgM9216_GetAttributeViString(
    ViSession Vi,
    ViConstString RepCapIdentifier,
    ViAttr AttributeID,
    ViInt32 AttributeValueBufferSize,
    ViChar[] AttributeValue
);

Parameters

Vi

The ViSession handle that you obtain from the IviDriver_init or IviDriver_InitWithOptions function. The handle identifies a particular instrument session.

RepCapIdentifier

Must be VI_NULL or an empty string. This attribute is not defined on a repeated capability.

AttributeID

Must be AGM9216_ATTR_SPECIFIC_DRIVER_REVISION.

AttributeValueBufferSize

The number of bytes in the ViChar array that the user specifies for the AttributeValue parameter.

AttributeValue

The buffer in which the function returns the current value of the attribute. Can be VI_NULL if AttributeValueBufferSize is 0.

See Also

Reference

Driver Identification
AgM9216


AGM9216_ATTR_SPECIFIC_DRIVER_VENDOR Attribute

[image]

AgM9216 IVI Driver Reference Agilent Technologies
AGM9216_ATTR_SPECIFIC_DRIVER_VENDOR Attribute
Driver Identification See Also

Returns the name of the vendor that supplies the IVI specific driver. The string that this attribute returns contains a maximum of 256 bytes including the NUL byte.

Attribute Tree Node: \AgM9216\Inherent IVI Attributes\Driver Identification\Specific Driver Vendor
Declaration: AgM9216.h
Implementation: AgM9216.dll

Syntax

Visual C++
#define AGM9216_ATTR_SPECIFIC_DRIVER_VENDOR 1050513

ViStatus AgM9216_GetAttributeViString(
    ViSession Vi,
    ViConstString RepCapIdentifier,
    ViAttr AttributeID,
    ViInt32 AttributeValueBufferSize,
    ViChar[] AttributeValue
);

Parameters

Vi

The ViSession handle that you obtain from the IviDriver_init or IviDriver_InitWithOptions function. The handle identifies a particular instrument session.

RepCapIdentifier

Must be VI_NULL or an empty string. This attribute is not defined on a repeated capability.

AttributeID

Must be AGM9216_ATTR_SPECIFIC_DRIVER_VENDOR.

AttributeValueBufferSize

The number of bytes in the ViChar array that the user specifies for the AttributeValue parameter.

AttributeValue

The buffer in which the function returns the current value of the attribute. Can be VI_NULL if AttributeValueBufferSize is 0.

See Also

Reference

Driver Identification
AgM9216


Instrument Identification

[image]

AgM9216 IVI Driver Reference Agilent Technologies
Instrument Identification
See Also

Tree Node: \AgM9216\Inherent IVI Attributes\Instrument Identification

Attributes

 | Name | Description
Attribute | Instrument Firmware Revision | The firmware revision reported by the physical instrument. If Simulation is enabled or the instrument is not capable of reporting the firmware revision, a string is returned that explains the condition.
Attribute | Instrument Manufacturer | The name of the manufacturer reported by the physical instrument. If Simulation is enabled or the instrument is not capable of reporting the name of the manufacturer, a string is returned that explains the condition. Manufacturer is limited to 256 bytes
Attribute | Instrument Model | The model number or name reported by the physical instrument. If Simulation is enabled or the instrument is not capable of reporting the model number or name, a string is returned that explains the condition. Model is limited to 256 bytes
Top

See Also

Reference

AgM9216


AGM9216_ATTR_INSTRUMENT_FIRMWARE_REVISION Attribute

[image]

AgM9216 IVI Driver Reference Agilent Technologies
AGM9216_ATTR_INSTRUMENT_FIRMWARE_REVISION Attribute
Instrument Identification See Also

The firmware revision reported by the physical instrument. If Simulation is enabled or the instrument is not capable of reporting the firmware revision, a string is returned that explains the condition.

Attribute Tree Node: \AgM9216\Inherent IVI Attributes\Instrument Identification\Instrument Firmware Revision
Declaration: AgM9216.h
Implementation: AgM9216.dll

Syntax

Visual C++
#define AGM9216_ATTR_INSTRUMENT_FIRMWARE_REVISION 1050510

ViStatus AgM9216_GetAttributeViString(
    ViSession Vi,
    ViConstString RepCapIdentifier,
    ViAttr AttributeID,
    ViInt32 AttributeValueBufferSize,
    ViChar[] AttributeValue
);

Parameters

Vi

The ViSession handle that you obtain from the IviDriver_init or IviDriver_InitWithOptions function. The handle identifies a particular instrument session.

RepCapIdentifier

Must be VI_NULL or an empty string. This attribute is not defined on a repeated capability.

AttributeID

Must be AGM9216_ATTR_INSTRUMENT_FIRMWARE_REVISION.

AttributeValueBufferSize

The number of bytes in the ViChar array that the user specifies for the AttributeValue parameter.

AttributeValue

The buffer in which the function returns the current value of the attribute. Can be VI_NULL if AttributeValueBufferSize is 0.

See Also

Reference

Instrument Identification
AgM9216


AGM9216_ATTR_INSTRUMENT_MANUFACTURER Attribute

[image]

AgM9216 IVI Driver Reference Agilent Technologies
AGM9216_ATTR_INSTRUMENT_MANUFACTURER Attribute
Instrument Identification See Also

The name of the manufacturer reported by the physical instrument. If Simulation is enabled or the instrument is not capable of reporting the name of the manufacturer, a string is returned that explains the condition. Manufacturer is limited to 256 bytes

Attribute Tree Node: \AgM9216\Inherent IVI Attributes\Instrument Identification\Instrument Manufacturer
Declaration: AgM9216.h
Implementation: AgM9216.dll

Syntax

Visual C++
#define AGM9216_ATTR_INSTRUMENT_MANUFACTURER 1050511

ViStatus AgM9216_GetAttributeViString(
    ViSession Vi,
    ViConstString RepCapIdentifier,
    ViAttr AttributeID,
    ViInt32 AttributeValueBufferSize,
    ViChar[] AttributeValue
);

Parameters

Vi

The ViSession handle that you obtain from the IviDriver_init or IviDriver_InitWithOptions function. The handle identifies a particular instrument session.

RepCapIdentifier

Must be VI_NULL or an empty string. This attribute is not defined on a repeated capability.

AttributeID

Must be AGM9216_ATTR_INSTRUMENT_MANUFACTURER.

AttributeValueBufferSize

The number of bytes in the ViChar array that the user specifies for the AttributeValue parameter.

AttributeValue

The buffer in which the function returns the current value of the attribute. Can be VI_NULL if AttributeValueBufferSize is 0.

See Also

Reference

Instrument Identification
AgM9216


AGM9216_ATTR_INSTRUMENT_MODEL Attribute

[image]

AgM9216 IVI Driver Reference Agilent Technologies
AGM9216_ATTR_INSTRUMENT_MODEL Attribute
Instrument Identification See Also

The model number or name reported by the physical instrument. If Simulation is enabled or the instrument is not capable of reporting the model number or name, a string is returned that explains the condition. Model is limited to 256 bytes

Attribute Tree Node: \AgM9216\Inherent IVI Attributes\Instrument Identification\Instrument Model
Declaration: AgM9216.h
Implementation: AgM9216.dll

Syntax

Visual C++
#define AGM9216_ATTR_INSTRUMENT_MODEL 1050512

ViStatus AgM9216_GetAttributeViString(
    ViSession Vi,
    ViConstString RepCapIdentifier,
    ViAttr AttributeID,
    ViInt32 AttributeValueBufferSize,
    ViChar[] AttributeValue
);

Parameters

Vi

The ViSession handle that you obtain from the IviDriver_init or IviDriver_InitWithOptions function. The handle identifies a particular instrument session.

RepCapIdentifier

Must be VI_NULL or an empty string. This attribute is not defined on a repeated capability.

AttributeID

Must be AGM9216_ATTR_INSTRUMENT_MODEL.

AttributeValueBufferSize

The number of bytes in the ViChar array that the user specifies for the AttributeValue parameter.

AttributeValue

The buffer in which the function returns the current value of the attribute. Can be VI_NULL if AttributeValueBufferSize is 0.

See Also

Reference

Instrument Identification
AgM9216


User Options

[image]

AgM9216 IVI Driver Reference Agilent Technologies
User Options
See Also

Tree Node: \AgM9216\Inherent IVI Attributes\User Options

Attributes

 | Name | Description
Attribute | Cache | Drivers may choose to always cache some instrument settings, never cache others, and optionally cache others, to avoid unecessary I/O to the instrument. If True, the driver caches optionally cached instrument settings.
Attribute | Interchange Check | If True, the driver maintains a record of interchangeability warnings. If the driver does not support interchangeability checking, attempts to set InterchangeCheck to True return an error.
Attribute | Query Instrument Status | If True, the driver queries the instrument status at the end of each method or property that performs I/O to the instrument. If an error is reported, use ErrorQuery to retrieve error messages one at a time from the instrument.
Attribute | Range Check | Drivers may choose to always validate some property/parameter values, never validate others, and optionally validate others, to avoid sending invalid commands to the instrument. If True, the driver performs optional validations.
Attribute | Record Value Coercions | If True, the driver keeps a list of the value coercions it makes for ViInt32 and ViReal64 attributes. If the driver does not support coercion recording, attempts to set RecordCoercions to True will return an error.
Attribute | Simulate | If True, the driver does not perform I/O to the instrument, and returns simulated values for output parameters.
Top

See Also

Reference

AgM9216


AGM9216_ATTR_CACHE Attribute

[image]

AgM9216 IVI Driver Reference Agilent Technologies
AGM9216_ATTR_CACHE Attribute
User Options See Also

Drivers may choose to always cache some instrument settings, never cache others, and optionally cache others, to avoid unecessary I/O to the instrument. If True, the driver caches optionally cached instrument settings.

Attribute Tree Node: \AgM9216\Inherent IVI Attributes\User Options\Cache
Declaration: AgM9216.h
Implementation: AgM9216.dll

Syntax

Visual C++
#define AGM9216_ATTR_CACHE 1050004

ViStatus AgM9216_GetAttributeViBoolean(
    ViSession Vi,
    ViConstString RepCapIdentifier,
    ViAttr AttributeID,
    ViBoolean* AttributeValue
);

ViStatus AgM9216_SetAttributeViBoolean(
    ViSession Vi,
    ViConstString RepCapIdentifier,
    ViAttr AttributeID,
    ViBoolean AttributeValue
);

Parameters

Vi

The ViSession handle that you obtain from the IviDriver_init or IviDriver_InitWithOptions function. The handle identifies a particular instrument session.

RepCapIdentifier

Must be VI_NULL or an empty string. This attribute is not defined on a repeated capability.

AttributeID

Must be AGM9216_ATTR_CACHE.

AttributeValue (GetAttribute)

Returns the current value of the attribute. The user must specify the address of a variable that has the same data type as the attribute.

AttributeValue (SetAttribute)

The value to which to set the attribute.

See Also

Reference

User Options
AgM9216


AGM9216_ATTR_INTERCHANGE_CHECK Attribute

[image]

AgM9216 IVI Driver Reference Agilent Technologies
AGM9216_ATTR_INTERCHANGE_CHECK Attribute
User Options See Also

If True, the driver maintains a record of interchangeability warnings. If the driver does not support interchangeability checking, attempts to set InterchangeCheck to True return an error.

Attribute Tree Node: \AgM9216\Inherent IVI Attributes\User Options\Interchange Check
Declaration: AgM9216.h
Implementation: AgM9216.dll

Syntax

Visual C++
#define AGM9216_ATTR_INTERCHANGE_CHECK 1050021

ViStatus AgM9216_GetAttributeViBoolean(
    ViSession Vi,
    ViConstString RepCapIdentifier,
    ViAttr AttributeID,
    ViBoolean* AttributeValue
);

ViStatus AgM9216_SetAttributeViBoolean(
    ViSession Vi,
    ViConstString RepCapIdentifier,
    ViAttr AttributeID,
    ViBoolean AttributeValue
);

Parameters

Vi

The ViSession handle that you obtain from the IviDriver_init or IviDriver_InitWithOptions function. The handle identifies a particular instrument session.

RepCapIdentifier

Must be VI_NULL or an empty string. This attribute is not defined on a repeated capability.

AttributeID

Must be AGM9216_ATTR_INTERCHANGE_CHECK.

AttributeValue (GetAttribute)

Returns the current value of the attribute. The user must specify the address of a variable that has the same data type as the attribute.

AttributeValue (SetAttribute)

The value to which to set the attribute.

See Also

Reference

User Options
AgM9216


AGM9216_ATTR_QUERY_INSTRUMENT_STATUS Attribute

[image]

AgM9216 IVI Driver Reference Agilent Technologies
AGM9216_ATTR_QUERY_INSTRUMENT_STATUS Attribute
User Options See Also

If True, the driver queries the instrument status at the end of each method or property that performs I/O to the instrument. If an error is reported, use ErrorQuery to retrieve error messages one at a time from the instrument.

Attribute Tree Node: \AgM9216\Inherent IVI Attributes\User Options\Query Instrument Status
Declaration: AgM9216.h
Implementation: AgM9216.dll

Syntax

Visual C++
#define AGM9216_ATTR_QUERY_INSTRUMENT_STATUS 1050003

ViStatus AgM9216_GetAttributeViBoolean(
    ViSession Vi,
    ViConstString RepCapIdentifier,
    ViAttr AttributeID,
    ViBoolean* AttributeValue
);

ViStatus AgM9216_SetAttributeViBoolean(
    ViSession Vi,
    ViConstString RepCapIdentifier,
    ViAttr AttributeID,
    ViBoolean AttributeValue
);

Parameters

Vi

The ViSession handle that you obtain from the IviDriver_init or IviDriver_InitWithOptions function. The handle identifies a particular instrument session.

RepCapIdentifier

Must be VI_NULL or an empty string. This attribute is not defined on a repeated capability.

AttributeID

Must be AGM9216_ATTR_QUERY_INSTRUMENT_STATUS.

AttributeValue (GetAttribute)

Returns the current value of the attribute. The user must specify the address of a variable that has the same data type as the attribute.

AttributeValue (SetAttribute)

The value to which to set the attribute.

See Also

Reference

User Options
AgM9216


AGM9216_ATTR_RANGE_CHECK Attribute

[image]

AgM9216 IVI Driver Reference Agilent Technologies
AGM9216_ATTR_RANGE_CHECK Attribute
User Options See Also

Drivers may choose to always validate some property/parameter values, never validate others, and optionally validate others, to avoid sending invalid commands to the instrument. If True, the driver performs optional validations.

Attribute Tree Node: \AgM9216\Inherent IVI Attributes\User Options\Range Check
Declaration: AgM9216.h
Implementation: AgM9216.dll

Syntax

Visual C++
#define AGM9216_ATTR_RANGE_CHECK 1050002

ViStatus AgM9216_GetAttributeViBoolean(
    ViSession Vi,
    ViConstString RepCapIdentifier,
    ViAttr AttributeID,
    ViBoolean* AttributeValue
);

ViStatus AgM9216_SetAttributeViBoolean(
    ViSession Vi,
    ViConstString RepCapIdentifier,
    ViAttr AttributeID,
    ViBoolean AttributeValue
);

Parameters

Vi

The ViSession handle that you obtain from the IviDriver_init or IviDriver_InitWithOptions function. The handle identifies a particular instrument session.

RepCapIdentifier

Must be VI_NULL or an empty string. This attribute is not defined on a repeated capability.

AttributeID

Must be AGM9216_ATTR_RANGE_CHECK.

AttributeValue (GetAttribute)

Returns the current value of the attribute. The user must specify the address of a variable that has the same data type as the attribute.

AttributeValue (SetAttribute)

The value to which to set the attribute.

See Also

Reference

User Options
AgM9216


AGM9216_ATTR_RECORD_COERCIONS Attribute

[image]

AgM9216 IVI Driver Reference Agilent Technologies
AGM9216_ATTR_RECORD_COERCIONS Attribute
User Options See Also

If True, the driver keeps a list of the value coercions it makes for ViInt32 and ViReal64 attributes. If the driver does not support coercion recording, attempts to set RecordCoercions to True will return an error.

Attribute Tree Node: \AgM9216\Inherent IVI Attributes\User Options\Record Value Coercions
Declaration: AgM9216.h
Implementation: AgM9216.dll

Syntax

Visual C++
#define AGM9216_ATTR_RECORD_COERCIONS 1050006

ViStatus AgM9216_GetAttributeViBoolean(
    ViSession Vi,
    ViConstString RepCapIdentifier,
    ViAttr AttributeID,
    ViBoolean* AttributeValue
);

ViStatus AgM9216_SetAttributeViBoolean(
    ViSession Vi,
    ViConstString RepCapIdentifier,
    ViAttr AttributeID,
    ViBoolean AttributeValue
);

Parameters

Vi

The ViSession handle that you obtain from the IviDriver_init or IviDriver_InitWithOptions function. The handle identifies a particular instrument session.

RepCapIdentifier

Must be VI_NULL or an empty string. This attribute is not defined on a repeated capability.

AttributeID

Must be AGM9216_ATTR_RECORD_COERCIONS.

AttributeValue (GetAttribute)

Returns the current value of the attribute. The user must specify the address of a variable that has the same data type as the attribute.

AttributeValue (SetAttribute)

The value to which to set the attribute.

See Also

Reference

User Options
AgM9216


AGM9216_ATTR_SIMULATE Attribute

[image]

AgM9216 IVI Driver Reference Agilent Technologies
AGM9216_ATTR_SIMULATE Attribute
User Options See Also

If True, the driver does not perform I/O to the instrument, and returns simulated values for output parameters.

Attribute Tree Node: \AgM9216\Inherent IVI Attributes\User Options\Simulate
Declaration: AgM9216.h
Implementation: AgM9216.dll

Syntax

Visual C++
#define AGM9216_ATTR_SIMULATE 1050005

ViStatus AgM9216_GetAttributeViBoolean(
    ViSession Vi,
    ViConstString RepCapIdentifier,
    ViAttr AttributeID,
    ViBoolean* AttributeValue
);

ViStatus AgM9216_SetAttributeViBoolean(
    ViSession Vi,
    ViConstString RepCapIdentifier,
    ViAttr AttributeID,
    ViBoolean AttributeValue
);

Parameters

Vi

The ViSession handle that you obtain from the IviDriver_init or IviDriver_InitWithOptions function. The handle identifies a particular instrument session.

RepCapIdentifier

Must be VI_NULL or an empty string. This attribute is not defined on a repeated capability.

AttributeID

Must be AGM9216_ATTR_SIMULATE.

AttributeValue (GetAttribute)

Returns the current value of the attribute. The user must specify the address of a variable that has the same data type as the attribute.

AttributeValue (SetAttribute)

The value to which to set the attribute.

See Also

Reference

User Options
AgM9216


AgM9216_init Function

[image]

AgM9216 IVI Driver Reference Agilent Technologies
AgM9216_init Function
AgM9216 See Also

Opens the I/O session to the instrument. Driver methods and properties that access the instrument are only accessible after Initialize is called. Initialize optionally performs a Reset and queries the instrument to validate the instrument model.

Function Tree Node: \AgM9216\Initialize
Declaration: AgM9216.h
Implementation: AgM9216.dll

Syntax

Visual C++
ViStatus AgM9216_init(
    ViRsrc ResourceName,
    ViBoolean IdQuery,
    ViBoolean Reset,
    ViSession* Vi
);

Parameters

ResourceName

An IVI logical name or an instrument specific string that identifies the address of the instrument, such as a VISA resource descriptor string.

IdQuery

Specifies whether to verify the ID of the instrument.

Reset

Specifies whether to reset the instrument.

Vi

Unique identifier for an IVI session.

Return Value

Success or failure code.

Remarks

For detailed parameter usage see: Initializing the IVI-C Driver

See Also

Reference

AgM9216
AgM9216


AgM9216_InitWithOptions Function

[image]

AgM9216 IVI Driver Reference Agilent Technologies
AgM9216_InitWithOptions Function
AgM9216 See Also

Opens the I/O session to the instrument. Driver methods and properties that access the instrument are only accessible after Initialize is called. Initialize optionally performs a Reset and queries the instrument to validate the instrument model.

Function Tree Node: \AgM9216\Initialize With Options
Declaration: AgM9216.h
Implementation: AgM9216.dll

Syntax

Visual C++
ViStatus AgM9216_InitWithOptions(
    ViRsrc ResourceName,
    ViBoolean IdQuery,
    ViBoolean Reset,
    ViConstString OptionsString,
    ViSession* Vi
);

Parameters

ResourceName

An IVI logical name or an instrument specific string that identifies the address of the instrument, such as a VISA resource descriptor string.

IdQuery

Specifies whether to verify the ID of the instrument.

Reset

Specifies whether to reset the instrument.

OptionsString

The user can use the OptionsString parameter to specify the initial values of certain IVI inherent attributes for the session. The format of an assignment in the OptionsString parameteris "Name=Value", where Name is one of: RangeCheck, QuerytInstrStatus, Cache, Simulate, RecordCoercions, InterchangeCheck,or DriverSetup. Value is either true or false except for DriverSetup. If the Options String parameter contains an assignment for the Driver Setup attribute, the Initialize function assumes that everything following "DriverSetup=" is part of the assignment.

Vi

Unique identifier for an IVI session.

Return Value

Success or failure code.

Remarks

For detailed parameter usage see: Initializing the IVI-C Driver

See Also

Reference

AgM9216
AgM9216


Instrument Specific

[image]

AgM9216 IVI Driver Reference Agilent Technologies
Instrument Specific
See Also

Tree Node: \AgM9216\Instrument Specific

Branches

Name
Acquisition
Channel
System
Top

Functions

 | Name | Description
Function | Set Measurement Mode | Sets the Measurement mode (Single channel) or (Multiple Channel).
Function | Set Trigger Mode | Sets the M9216A in immediate or trigger(Channel) mode.
Function | Update Hardware | Loads the digitizer configuration and connector selection into the hardware. All changes to configuration settings and connector selection are cached in the host driver until this command is called. This command effectively synchronizes the host driver and hardware.
Top

Attributes

 | Name | Description
Attribute | Measurement Mode | This property determines whether the M9216A is set in Single channel or Multiple Channel personality. When this property is changed, the device's configuration properties will be reinitialized to the default settings. InputConnector for all channels will be set to 1. An update hardware command will also be sent to the hardware.
Attribute | Trigger Mode | This property sets whether the M9216A channels uses the trigger level settings to perform the measurement, or to instead acquire data immediately upon receiving the Initiate command.
Top

See Also

Reference

AgM9216


Acquisition

[image]

AgM9216 IVI Driver Reference Agilent Technologies
Acquisition
See Also

Tree Node: \AgM9216\Instrument Specific\Acquisition

Functions

 | Name | Description
Function | Get Status | This function can be used to check the acquisition status of the digitizer's channel. The status can any of the following as shown in remark section below.
Function | Initiate | This function causes the M9216 to start acquiring waveform on all channels. In AgM9216TriggerModeImmediate mode, all channels will start waveform acquisiton. In AgM9216TriggerModeChannel mode, each channel will wait for a valid trigger from its source signal before acquiring data..
Function | Wait For Acquisition Complete | Waits until the initiated acquisition is complete. Acquisition is complete when all channel(s) have successfully acquired the waveform or timed out waiting for a valid trigger. If no acquisition is currently running, this function returns immediately.
Top

See Also

Reference

AgM9216


AgM9216_AcquisitionGetStatus Function

[image]

AgM9216 IVI Driver Reference Agilent Technologies
AgM9216_AcquisitionGetStatus Function
Acquisition See Also

This function can be used to check the acquisition status of the digitizer's channel. The status can any of the following as shown in remark section below.

Function Tree Node: \AgM9216\Instrument Specific\Acquisition\Get Status
Declaration: AgM9216.h
Implementation: AgM9216.dll

Syntax

Visual C++
ViStatus AgM9216_AcquisitionGetStatus(
    ViSession Vi,
    ViInt32 ValBufferSize,
    ViInt32[] Val,
    ViInt32* ValActualSize
);

Parameters

Vi

The ViSession handle that you obtain from the IviDriver_init or IviDriver_InitWithOptions function. The handle identifies a particular instrument session.

ValBufferSize

Number of elements in Val.

Val

In Multiple Channel mode, the array contains the pointer to an array of eight variables of type enum AgM9216AcquisitionEnum. In Single Channel mode, the array contains only the acquisition status of the currently selected channel. The array must be allocated by the the user .

ValActualSize

Number of elements in Val

Return Value

Success or failure code.

Remarks

AgM9216DigitizerRangeSelectLow - Fetch only the wavefrom from 5V Range sub channel.

AgM9216DigitizerRangeSelectHigh - Fetch only the wavefrom from 100V Range sub channel.

AgM9216DigitizerRangeSelectBoth[Default] - Fetch the wavefrom from both the 5V and 100V Range sub channels.

AgM9216DigitizerRangeSelectNone - Do not prefetch any data.

Note: If both the low and high range data have been prefetched to the driver (i.e Channels.Measurement.RangeSelect = AgM9216MeasurementRangeSelectBoth), this parameter selects which data range is copied to user memory(buffer). Otherwise this parameter is ignored. Valid input : AgM9216DigitizerRangeSelectLow & AgM9216DigitizerRangeSelectHigh

Defined Values For Parameter Val

Name | Description
AGM9216_VAL_ACQUISITION_STATUS_IDLE | The channel is idle. No acquisition has been initiated.
AGM9216_VAL_ACQUISITION_STATUS_BUSY | The channel is still in the process of looking for a trigger or still aquiring data.
AGM9216_VAL_ACQUISITION_STATUS_COMPLETED | The acquisiton has completed successfully.
AGM9216_VAL_ACQUISITION_STATUS_TIME_OUT | Applicable when trigger mode is set to AgM9216TriggerModeChannel. The acquisition has failed because a valid trigger was not received during within the specified time out period. No data will be available from the channel(s) that had a timeout.
Top

See Also

Reference

Acquisition
AgM9216


AgM9216_AcquisitionInitiate Function

[image]

AgM9216 IVI Driver Reference Agilent Technologies
AgM9216_AcquisitionInitiate Function
Acquisition See Also

This function causes the M9216 to start acquiring waveform on all channels. In AgM9216TriggerModeImmediate mode, all channels will start waveform acquisiton. In AgM9216TriggerModeChannel mode, each channel will wait for a valid trigger from its source signal before acquiring data..

Function Tree Node: \AgM9216\Instrument Specific\Acquisition\Initiate
Declaration: AgM9216.h
Implementation: AgM9216.dll

Syntax

Visual C++
ViStatus AgM9216_AcquisitionInitiate(
    ViSession Vi
);

Parameters

Vi

The ViSession handle that you obtain from the IviDriver_init or IviDriver_InitWithOptions function. The handle identifies a particular instrument session.

Return Value

Success or failure code.

Remarks

This function returns immediately. The status of the acquisition can be polled by using GetStatus. Call WaitforAcquisitonToComplete if user desires to wait for the M9216 to complete acquisition.

See Also

Reference

Acquisition
AgM9216


AgM9216_AcquisitionWaitForAcquisitionComplete Function

[image]

AgM9216 IVI Driver Reference Agilent Technologies
AgM9216_AcquisitionWaitForAcquisitionComplete Function
Acquisition See Also

Waits until the initiated acquisition is complete. Acquisition is complete when all channel(s) have successfully acquired the waveform or timed out waiting for a valid trigger. If no acquisition is currently running, this function returns immediately.

Function Tree Node: \AgM9216\Instrument Specific\Acquisition\Wait For Acquisition Complete
Declaration: AgM9216.h
Implementation: AgM9216.dll

Syntax

Visual C++
ViStatus AgM9216_AcquisitionWaitForAcquisitionComplete(
    ViSession Vi
);

Parameters

Vi

The ViSession handle that you obtain from the IviDriver_init or IviDriver_InitWithOptions function. The handle identifies a particular instrument session.

Return Value

Success or failure code.

See Also

Reference

Acquisition
AgM9216


Channel

[image]

AgM9216 IVI Driver Reference Agilent Technologies
Channel
See Also

Tree Node: \AgM9216\Instrument Specific\Channel

Branches

Name
Measurement
Trigger
Top

Functions

 | Name | Description
Function | Configure | This function allows the user to configure any of the input ports that belongs to this channel. InputPort does not have to be the currently selected port. The M9216A allows each input port to have a unique configuration. When the user selects an input port for acquistion, using the InputPort (or InputConnectorSelection) property, the digitizer channel will automatically be configured with the port's configuration.Note that if the InputPort does not belong to the channel , an error code will be returned.
Function | Get Channel Name | Returns the channel name that corresponds to the one-based index that the user specifies.
Function | Set Input Connector Selection | Set the Input connector of a channel (Digitizer).
Function | Set Input Port | Sets the active (physically switch) port number belonging to the channel (digitizer). Return value is integer of 1 to 32.
Function | Set Record Size | Sets the acquisition recordSize of the Input connector of the channel (digitizer).
Top

Attributes

 | Name | Description
Attribute | Aux Out Enabled | Set this property to true to switch the currently selected input port to instead become an auxiliary output port of the digitizer. A true setting is not allowed in AgM9216MeasurementModeSingle mode. Users are not allowed to switch to Auxiliary ports in this mode.
Attribute | BankID | -- READ ONLY -- In multichannel mode this property returns the bank number of the specified digitizer(channel). In Single Channel mode, there is only one logical digitizer channel, the value returned is always 0. See the link further below for a table of information..
Attribute | Channel Count |
Attribute | Input Connector Selection | Select the logical input connector to for each channel. In AgM9216MeasurementModeMultiple mode, there are four input connectors for each channel while in AgM9216MeasurementModeSingle mode, the Input Port selection must be used to specify which physical connection will supply the signal to be measured.The input will be either connected to the specified digitizer (channel) or the auxiliary output port, depending upon the AuxOutEnabled setting.
Attribute | Input Port | Select the input port for the channel. Note that the multiplexer relays in the hardware will only be activated after the UpdateHardware command is sent.The input port will be either connected to the specified digitizer (channel) or auxiliary out port, depending on the AuxOutEnabled property setting.
Attribute | Record Size | Sets or reads the number of samples to acquire for the waveform. This property applies for the currently selected port. To set the record length for a port that is not currently selected, use the Configure function.
Top

See Also

Reference

AgM9216


AGM9216_ATTR_CHANNEL_AUX_OUT_ENABLED Attribute

[image]

AgM9216 IVI Driver Reference Agilent Technologies
AGM9216_ATTR_CHANNEL_AUX_OUT_ENABLED Attribute
Channel See Also

Set this property to true to switch the currently selected input port to instead become an auxiliary output port of the digitizer. A true setting is not allowed in AgM9216MeasurementModeSingle mode. Users are not allowed to switch to Auxiliary ports in this mode.

Attribute Tree Node: \AgM9216\Instrument Specific\Channel\Aux Out Enabled
Declaration: AgM9216.h
Implementation: AgM9216.dll

Syntax

Visual C++
#define AGM9216_ATTR_CHANNEL_AUX_OUT_ENABLED 1150033

ViStatus AgM9216_GetAttributeViBoolean(
    ViSession Vi,
    ViConstString RepCapIdentifier,
    ViAttr AttributeID,
    ViBoolean* AttributeValue
);

ViStatus AgM9216_SetAttributeViBoolean(
    ViSession Vi,
    ViConstString RepCapIdentifier,
    ViAttr AttributeID,
    ViBoolean AttributeValue
);

Parameters

Vi

The ViSession handle that you obtain from the IviDriver_init or IviDriver_InitWithOptions function. The handle identifies a particular instrument session.

RepCapIdentifier

A physical or virtual repeated capability identifier. For valid values, see the Channel repeated capability.

AttributeID

Must be AGM9216_ATTR_CHANNEL_AUX_OUT_ENABLED.

AttributeValue (GetAttribute)

Returns the current value of the attribute. The user must specify the address of a variable that has the same data type as the attribute.

AttributeValue (SetAttribute)

The value to which to set the attribute.

Remarks

Note that setting this property will also determine that AuxOutEnabled state of the digitizer within the same bank. For example

spDriver->Acquisition->Channels->Item("Channel1")->AuxOutEnabled=true;

will also result in

spDriver->Acquisition->Channels->Item("Channel2")-> AuxOutEnabled=true;

because Digitizer 1 and Digitizer 2 are members of the same bank. See Table 1.1 for the M9216's organization.

See Also

Reference

Channel
AgM9216


AGM9216_ATTR_CHANNEL_BANKID Attribute

[image]

AgM9216 IVI Driver Reference Agilent Technologies
AGM9216_ATTR_CHANNEL_BANKID Attribute
Channel See Also

-- READ ONLY -- In multichannel mode this property returns the bank number of the specified digitizer(channel). In Single Channel mode, there is only one logical digitizer channel, the value returned is always 0. See the link further below for a table of information..

Attribute Tree Node: \AgM9216\Instrument Specific\Channel\BankID
Declaration: AgM9216.h
Implementation: AgM9216.dll

Syntax

Visual C++
#define AGM9216_ATTR_CHANNEL_BANKID 1150035

ViStatus AgM9216_GetAttributeViInt32(
    ViSession Vi,
    ViConstString RepCapIdentifier,
    ViAttr AttributeID,
    ViInt32* AttributeValue
);

Parameters

Vi

The ViSession handle that you obtain from the IviDriver_init or IviDriver_InitWithOptions function. The handle identifies a particular instrument session.

RepCapIdentifier

A physical or virtual repeated capability identifier. For valid values, see the Channel repeated capability.

AttributeID

Must be AGM9216_ATTR_CHANNEL_BANKID.

AttributeValue

Returns the current value of the attribute. The user must specify the address of a variable that has the same data type as the attribute.

Remarks

Please refer to Table 1.1

See Also

Reference

Channel
AgM9216


AGM9216_ATTR_CHANNEL_COUNT Attribute

[image]

AgM9216 IVI Driver Reference Agilent Technologies
AGM9216_ATTR_CHANNEL_COUNT Attribute
Channel See Also

Attribute Tree Node: \AgM9216\Instrument Specific\Channel\Channel Count
Declaration: AgM9216.h
Implementation: AgM9216.dll

Syntax

Visual C++
#define AGM9216_ATTR_CHANNEL_COUNT 1050047

ViStatus AgM9216_GetAttributeViInt32(
    ViSession Vi,
    ViConstString RepCapIdentifier,
    ViAttr AttributeID,
    ViInt32* AttributeValue
);

Parameters

Vi

The ViSession handle that you obtain from the IviDriver_init or IviDriver_InitWithOptions function. The handle identifies a particular instrument session.

RepCapIdentifier

Must be VI_NULL or an empty string. This attribute is not defined on a repeated capability.

AttributeID

Must be AGM9216_ATTR_CHANNEL_COUNT.

AttributeValue

Returns the current value of the attribute. The user must specify the address of a variable that has the same data type as the attribute.

See Also

Reference

Channel
AgM9216


AgM9216_ChannelConfigure Function

[image]

AgM9216 IVI Driver Reference Agilent Technologies
AgM9216_ChannelConfigure Function
Channel See Also

This function allows the user to configure any of the input ports that belongs to this channel. InputPort does not have to be the currently selected port. The M9216A allows each input port to have a unique configuration. When the user selects an input port for acquistion, using the InputPort (or InputConnectorSelection) property, the digitizer channel will automatically be configured with the port's configuration.Note that if the InputPort does not belong to the channel , an error code will be returned.

Function Tree Node: \AgM9216\Instrument Specific\Channel\Configure
Declaration: AgM9216.h
Implementation: AgM9216.dll

Syntax

Visual C++
ViStatus AgM9216_ChannelConfigure(
    ViSession Vi,
    ViConstString Channel,
    ViInt32 InputPort,
    ViInt32 RecordSize,
    ViReal64 Level,
    ViReal64 Hysteresis,
    ViInt32 HoldOffCount,
    ViInt32 TimeOut,
    ViInt32 PreTriggerSamples,
    ViInt32 Delay,
    ViInt32 Slope
);

Parameters

Vi

The ViSession handle that you obtain from the IviDriver_init or IviDriver_InitWithOptions function. The handle identifies a particular instrument session.

Channel

The physical or virtual repeated capability identifier. Pass VI_NULL if the operation does not apply to a repeated capability. You can also pass VI_NULL if the device only has a single channel.For valid values, see the Channel repeated capability.

InputPort

The input port to configure. Must be a valid port for the channel.

RecordSize

Sets the number of samples to acquire for the waveform.

Level

Specifies the voltage threshold for the trigger sub-system. The units are Volts. Note that this setting is ignored if TriggerMode is AgM9216TriggerModeImmediate.

Hysteresis

Specifies the trigger hysteresis in Volts. Note that this setting is ignored if TriggerMode is AgM9216TriggerModeImmediate.

HoldOffCount

Specifies the number of valid edges to detect before waveform recording can occur. Note that this setting is ignored if TriggerMode is AgM9216TriggerModeImmediate.

TimeOut

Specifies the maximum allowable time for the channel to detect a valid trigger condition as specified by the configuration parameters. If the trigger condition is not met, a AgM9216AcquisitionStatusTimeOut is returned as acquisition status.The units are set in multiples of one microsecond.This setting is ignored if TriggerMode is AgM9216TriggerModeImmediate.

PreTriggerSamples

Specifies the number of samples that must be collected before a trigger event will be recognized. This value must not exceed the RecordSize of the waveform.This setting is ignored if TriggerMode is AgM9216TriggerModeImmediate.

Delay

Specifies the length of time from the valid trigger event to the first point in the waveform record. The units are in microseconds. The hardware resolution is microsecond and the driver will store the value closest to the hardware resolution.

Slope

Specifies trigger slope for the input port as either rising edge, falling edge ,both edges or DC level.Valid values are AgM9216TriggerSlopePositive , AgM9216TriggerSlopeNegative, AgM9216TriggerSlopeBoth and AgM9216TriggerSlopeLevel .This setting is ignored if TriggerMode is AgM9216TriggerModeImmediate.

Return Value

Success or failure code.

Remarks

The user may also configure (and read) the configuration of the currently selected InputPort by using the properties.

Defined Values For Parameter Slope

Name | Description
AGM9216_VAL_TRIGGER_SLOPE_POSITIVE | Configures trigger on the Positive slope.
AGM9216_VAL_TRIGGER_SLOPE_NEGATIVE | Configures trigger on the Negative slope.
AGM9216_VAL_TRIGGER_SLOPE_BOTH | Configures trigger on the both.
AGM9216_VAL_TRIGGER_SLOPE_LEVEL | Configures trigger on the DC level slope.
Top

See Also

Reference

Channel
AgM9216


AgM9216_GetChannelName Function

[image]

AgM9216 IVI Driver Reference Agilent Technologies
AgM9216_GetChannelName Function
Channel See Also

Returns the channel name that corresponds to the one-based index that the user specifies.

Function Tree Node: \AgM9216\Instrument Specific\Channel\Get Channel Name
Declaration: AgM9216.h
Implementation: AgM9216.dll

Syntax

Visual C++
ViStatus AgM9216_GetChannelName(
    ViSession Vi,
    ViInt32 Index,
    ViInt32 NameBufferSize,
    ViChar[] Name
);

Parameters

Vi

The ViSession handle that you obtain from the IviDriver_init or IviDriver_InitWithOptions function. The handle identifies a particular instrument session.

Index

A one-based index that defines which name to return.

NameBufferSize

Number of elements in Name.

Name

Specifies the buffer into which the function returns the name that corresponds to the index the user specifies. The caller may pass VI_NULL for this parameter if the buffer size parameter is 0.

Return Value

Success or failure code.

Remarks

In single channel mode, there is only one channel while in Multiple channel mode, there are eight available channels 1 to 8. Get the name using the Channels Name property.

See Also

Reference

Channel
AgM9216


AGM9216_ATTR_CHANNEL_INPUT_CONNECTOR_SELECTION Attribute

[image]

AgM9216 IVI Driver Reference Agilent Technologies
AGM9216_ATTR_CHANNEL_INPUT_CONNECTOR_SELECTION Attribute
Channel See Also

Select the logical input connector to for each channel. In AgM9216MeasurementModeMultiple mode, there are four input connectors for each channel while in AgM9216MeasurementModeSingle mode, the Input Port selection must be used to specify which physical connection will supply the signal to be measured.The input will be either connected to the specified digitizer (channel) or the auxiliary output port, depending upon the AuxOutEnabled setting.

Attribute Tree Node: \AgM9216\Instrument Specific\Channel\Input Connector Selection
Declaration: AgM9216.h
Implementation: AgM9216.dll

Syntax

Visual C++
#define AGM9216_ATTR_CHANNEL_INPUT_CONNECTOR_SELECTION 1150048

ViStatus AgM9216_GetAttributeViInt32(
    ViSession Vi,
    ViConstString RepCapIdentifier,
    ViAttr AttributeID,
    ViInt32* AttributeValue
);

ViStatus AgM9216_SetAttributeViInt32(
    ViSession Vi,
    ViConstString RepCapIdentifier,
    ViAttr AttributeID,
    ViInt32 AttributeValue
);

Parameters

Vi

The ViSession handle that you obtain from the IviDriver_init or IviDriver_InitWithOptions function. The handle identifies a particular instrument session.

RepCapIdentifier

A physical or virtual repeated capability identifier. For valid values, see the Channel repeated capability.

AttributeID

Must be AGM9216_ATTR_CHANNEL_INPUT_CONNECTOR_SELECTION.

AttributeValue (GetAttribute)

Returns the current value of the attribute. The user must specify the address of a variable that has the same data type as the attribute.

AttributeValue (SetAttribute)

The value to which to set the attribute.

Remarks

Refer to Table 1.1 for the relationship between InputPort and InputConnectorSelection.

See Also

Reference

Channel
AgM9216


AGM9216_ATTR_CHANNEL_INPUT_PORT Attribute

[image]

AgM9216 IVI Driver Reference Agilent Technologies
AGM9216_ATTR_CHANNEL_INPUT_PORT Attribute
Channel See Also

Select the input port for the channel. Note that the multiplexer relays in the hardware will only be activated after the UpdateHardware command is sent.The input port will be either connected to the specified digitizer (channel) or auxiliary out port, depending on the AuxOutEnabled property setting.

Attribute Tree Node: \AgM9216\Instrument Specific\Channel\Input Port
Declaration: AgM9216.h
Implementation: AgM9216.dll

Syntax

Visual C++
#define AGM9216_ATTR_CHANNEL_INPUT_PORT 1150038

ViStatus AgM9216_GetAttributeViInt32(
    ViSession Vi,
    ViConstString RepCapIdentifier,
    ViAttr AttributeID,
    ViInt32* AttributeValue
);

ViStatus AgM9216_SetAttributeViInt32(
    ViSession Vi,
    ViConstString RepCapIdentifier,
    ViAttr AttributeID,
    ViInt32 AttributeValue
);

Parameters

Vi

The ViSession handle that you obtain from the IviDriver_init or IviDriver_InitWithOptions function. The handle identifies a particular instrument session.

RepCapIdentifier

A physical or virtual repeated capability identifier. For valid values, see the Channel repeated capability.

AttributeID

Must be AGM9216_ATTR_CHANNEL_INPUT_PORT.

AttributeValue (GetAttribute)

Returns the current value of the attribute. The user must specify the address of a variable that has the same data type as the attribute.

AttributeValue (SetAttribute)

The value to which to set the attribute.

Remarks

NOTE: In single channel

If the user prefer to switch using the logical port identification, use InputConnectorSelection property instead. Refer to Table 1.1 for the relationship between InputPort and InputConnectorSelection.

See Also

Reference

Channel
AgM9216


Measurement

[image]

AgM9216 IVI Driver Reference Agilent Technologies
Measurement
See Also

Tree Node: \AgM9216\Instrument Specific\Channel\Measurement

Functions

 | Name | Description
Function | Fetch Waveform Int32 | When an acquisition for a channel has been completed successfully, acquisition data will be sent from the channel to the controller's driver memory. The user can use this function to copy the data into the user's buffer.
Function | Fetch Waveform Real64 | When an acquisition has been completed successfully, data will be prefetched from the hardware to the controller's driver memory. The user uses this function to calculate the actual voltage of the waveform and copy the result into user?s buffer. The voltage is calculated with the stored calibration coefficient.Note that when an acquisition is not successful, no data will be prefetched to the driver. The user can also choose not to prefetch any data by using the RangeSelect property.
Top

Attributes

 | Name | Description
Attribute | Range Select | Selects which waveform data from the 5V and 100V sub channels of the digitizer will be fetched to the driver after completing acquisition.When the M9216 is reset, the default value is AgM9216DigitizerRangeSelectBoth.
Top

See Also

Reference

AgM9216


AgM9216_MeasurementFetchWaveformInt32 Function

[image]

AgM9216 IVI Driver Reference Agilent Technologies
AgM9216_MeasurementFetchWaveformInt32 Function
Measurement See Also

When an acquisition for a channel has been completed successfully, acquisition data will be sent from the channel to the controller's driver memory. The user can use this function to copy the data into the user's buffer.

Function Tree Node: \AgM9216\Instrument Specific\Channel\Measurement\Fetch Waveform Int32
Declaration: AgM9216.h
Implementation: AgM9216.dll

Syntax

Visual C++
ViStatus AgM9216_MeasurementFetchWaveformInt32(
    ViSession Vi,
    ViConstString Channel,
    ViInt32 NoOfSamples,
    ViInt32 Range,
    ViInt32 ValBufferSize,
    ViInt32[] Val,
    ViInt32* ValActualSize
);

Parameters

Vi

The ViSession handle that you obtain from the IviDriver_init or IviDriver_InitWithOptions function. The handle identifies a particular instrument session.

Channel

The physical or virtual repeated capability identifier. Pass VI_NULL if the operation does not apply to a repeated capability. You can also pass VI_NULL if the device only has a single channel.For valid values, see the Channel repeated capability.

NoOfSamples

Specifies the number of points to be retrieved to the WaveformArray buffer.

Range

If both the low and high range data has been prefetched to the driver, his parameter selects which data range is copied to user memory.Otherwise this parameter is ignored.Valid input : AgM9216DigitizerRangeSelectLowAgM9216DigitizerRangeSelectHigh

ValBufferSize

Number of elements in Val.

Val

ValActualSize

Actual number of elements in Val.

Return Value

Success or failure code.

Remarks

Note that when an acquisition for a channel is not successful (i.e. timed out) or the user has chosen not to retrieve any data from the channel (by setting the RangeSelect property), no data for that channel will be available.

In these cases the FetchWaveformInt32 function will fill the user's array with value -65536 to indicate to the user that the data is invalid.

Defined Values For Parameter Range

Name | Description
AGM9216_VAL_MEASUREMENT_RANGE_SELECT_LOW | Fetch only the wavefrom from 5V Range sub channel.
AGM9216_VAL_MEASUREMENT_RANGE_SELECT_HIGH | Fetch only the wavefrom from 100V Range sub channel.
AGM9216_VAL_MEASUREMENT_RANGE_SELECT_BOTH | Fetch the wavefrom from both the 5V and 100V Range sub channels.
AGM9216_VAL_MEASUREMENT_RANGE_SELECT_NONE | Do not prefetch any data.
Top

See Also

Reference

Measurement
AgM9216


AgM9216_MeasurementFetchWaveformReal64 Function

[image]

AgM9216 IVI Driver Reference Agilent Technologies
AgM9216_MeasurementFetchWaveformReal64 Function
Measurement See Also

When an acquisition has been completed successfully, data will be prefetched from the hardware to the controller's driver memory. The user uses this function to calculate the actual voltage of the waveform and copy the result into user?s buffer. The voltage is calculated with the stored calibration coefficient.Note that when an acquisition is not successful, no data will be prefetched to the driver. The user can also choose not to prefetch any data by using the RangeSelect property.

Function Tree Node: \AgM9216\Instrument Specific\Channel\Measurement\Fetch Waveform Real64
Declaration: AgM9216.h
Implementation: AgM9216.dll

Syntax

Visual C++
ViStatus AgM9216_MeasurementFetchWaveformReal64(
    ViSession Vi,
    ViConstString Channel,
    ViInt32 NoOfSamples,
    ViInt32 Range,
    ViInt32 ValBufferSize,
    ViReal64[] Val,
    ViInt32* ValActualSize
);

Parameters

Vi

The ViSession handle that you obtain from the IviDriver_init or IviDriver_InitWithOptions function. The handle identifies a particular instrument session.

Channel

The physical or virtual repeated capability identifier. Pass VI_NULL if the operation does not apply to a repeated capability. You can also pass VI_NULL if the device only has a single channel.For valid values, see the Channel repeated capability.

NoOfSamples

Specifies the number of points to be retrieved to the WaveformArray buffer.

Range

If both the low and high range data has been prefetched to the driver, this parameter selects which data range is copied to user memory.Otherwise this parameter is ignored.Valid input : AgM9216DigitizerRangeSelectLowAgM9216DigitizerRangeSelectHigh

ValBufferSize

Number of elements in Val.

Val

ValActualSize

Actual number of elements in Val.

Return Value

Success or failure code.

Remarks

Note that when an acquisition for a channel is not successful (i.e. timed out) or the user has chosen not to retrieve any data from the channel (by setting the RangeSelect property), no data for that channel will be available. In these cases the FetchWaveformReal64 function will fill the user's array with value 1.0e35 to indicate to the user that the data is invalid.

Defined Values For Parameter Range

Name | Description
AGM9216_VAL_MEASUREMENT_RANGE_SELECT_LOW | Fetch only the wavefrom from 5V Range sub channel.
AGM9216_VAL_MEASUREMENT_RANGE_SELECT_HIGH | Fetch only the wavefrom from 100V Range sub channel.
AGM9216_VAL_MEASUREMENT_RANGE_SELECT_BOTH | Fetch the wavefrom from both the 5V and 100V Range sub channels.
AGM9216_VAL_MEASUREMENT_RANGE_SELECT_NONE | Do not prefetch any data.
Top

See Also

Reference

Measurement
AgM9216


AGM9216_ATTR_MEASUREMENT_RANGE_SELECT Attribute

[image]

AgM9216 IVI Driver Reference Agilent Technologies
AGM9216_ATTR_MEASUREMENT_RANGE_SELECT Attribute
Measurement See Also

Selects which waveform data from the 5V and 100V sub channels of the digitizer will be fetched to the driver after completing acquisition.When the M9216 is reset, the default value is AgM9216DigitizerRangeSelectBoth.

Attribute Tree Node: \AgM9216\Instrument Specific\Channel\Measurement\Range Select
Declaration: AgM9216.h
Implementation: AgM9216.dll

Syntax

Visual C++
#define AGM9216_ATTR_MEASUREMENT_RANGE_SELECT 1150034

ViStatus AgM9216_GetAttributeViInt32(
    ViSession Vi,
    ViConstString RepCapIdentifier,
    ViAttr AttributeID,
    ViInt32* AttributeValue
);

ViStatus AgM9216_SetAttributeViInt32(
    ViSession Vi,
    ViConstString RepCapIdentifier,
    ViAttr AttributeID,
    ViInt32 AttributeValue
);

Parameters

Vi

The ViSession handle that you obtain from the IviDriver_init or IviDriver_InitWithOptions function. The handle identifies a particular instrument session.

RepCapIdentifier

A physical or virtual repeated capability identifier. For valid values, see the Channel repeated capability.

AttributeID

Must be AGM9216_ATTR_MEASUREMENT_RANGE_SELECT.

AttributeValue (GetAttribute)

Returns the current value of the attribute. The user must specify the address of a variable that has the same data type as the attribute.

AttributeValue (SetAttribute)

The value to which to set the attribute.

Remarks

AgM9216DigitizerRangeSelectLow - Fetch only the wavefrom from 5V Range sub channel.

AgM9216DigitizerRangeSelectHigh - Fetch only the wavefrom from 100V Range sub channel.

AgM9216DigitizerRangeSelectBoth[Default] - Fetch the wavefrom from both the 5V and 100V Range sub channels.

AgM9216DigitizerRangeSelectNone - Do not prefetch any data.

Note: If both the low and high range data have been prefetched to the driver (i.e Channels.Measurement.RangeSelect = AgM9216MeasurementRangeSelectBoth), this parameter selects which data range is copied to user memory(buffer). Otherwise this parameter is ignored. Valid input : AgM9216DigitizerRangeSelectLow & AgM9216DigitizerRangeSelectHigh

Defined Values

Name | Description
AGM9216_VAL_MEASUREMENT_RANGE_SELECT_LOW | Fetch only the wavefrom from 5V Range sub channel.
AGM9216_VAL_MEASUREMENT_RANGE_SELECT_HIGH | Fetch only the wavefrom from 100V Range sub channel.
AGM9216_VAL_MEASUREMENT_RANGE_SELECT_BOTH | Fetch the wavefrom from both the 5V and 100V Range sub channels.
AGM9216_VAL_MEASUREMENT_RANGE_SELECT_NONE | Do not prefetch any data.
Top

See Also

Reference

Measurement
AgM9216


AGM9216_ATTR_CHANNEL_RECORD_SIZE Attribute

[image]

AgM9216 IVI Driver Reference Agilent Technologies
AGM9216_ATTR_CHANNEL_RECORD_SIZE Attribute
Channel See Also

Sets or reads the number of samples to acquire for the waveform. This property applies for the currently selected port. To set the record length for a port that is not currently selected, use the Configure function.

Attribute Tree Node: \AgM9216\Instrument Specific\Channel\Record Size
Declaration: AgM9216.h
Implementation: AgM9216.dll

Syntax

Visual C++
#define AGM9216_ATTR_CHANNEL_RECORD_SIZE 1150037

ViStatus AgM9216_GetAttributeViInt32(
    ViSession Vi,
    ViConstString RepCapIdentifier,
    ViAttr AttributeID,
    ViInt32* AttributeValue
);

ViStatus AgM9216_SetAttributeViInt32(
    ViSession Vi,
    ViConstString RepCapIdentifier,
    ViAttr AttributeID,
    ViInt32 AttributeValue
);

Parameters

Vi

The ViSession handle that you obtain from the IviDriver_init or IviDriver_InitWithOptions function. The handle identifies a particular instrument session.

RepCapIdentifier

A physical or virtual repeated capability identifier. For valid values, see the Channel repeated capability.

AttributeID

Must be AGM9216_ATTR_CHANNEL_RECORD_SIZE.

AttributeValue (GetAttribute)

Returns the current value of the attribute. The user must specify the address of a variable that has the same data type as the attribute.

AttributeValue (SetAttribute)

The value to which to set the attribute.

Remarks

Allowable setting.

Min: 0

Default: 5000

Max: 30000 ( Multiple Channel mode )

Max: 240000 ( SingleChannel mode )

See Also

Reference

Channel
AgM9216


AgM9216_SetChannelInputConnectorSelection Function

[image]

AgM9216 IVI Driver Reference Agilent Technologies
AgM9216_SetChannelInputConnectorSelection Function
Channel See Also

Set the Input connector of a channel (Digitizer).

Function Tree Node: \AgM9216\Instrument Specific\Channel\Set Input Connector Selection
Declaration: AgM9216.h
Implementation: AgM9216.dll

Syntax

Visual C++
ViStatus AgM9216_SetChannelInputConnectorSelection(
    ViSession Vi,
    ViConstString Channel,
    ViInt32 InputConnectorSelection
);

Parameters

Vi

The ViSession handle that you obtain from the IviDriver_init or IviDriver_InitWithOptions function. The handle identifies a particular instrument session.

Channel

The physical or virtual repeated capability identifier. Pass VI_NULL if the operation does not apply to a repeated capability. You can also pass VI_NULL if the device only has a single channel.For valid values, see the Channel repeated capability.

InputConnectorSelection

Select the logical input connector to for each channel. In AgM9216MeasurementModeMultiple mode, there are four input connectors for each channel while in AgM9216MeasurementModeSingle mode there are thirty two connectors. If the user prefers to switch using use the physical port identification, use InputPort property instead to select the input.

Return Value

Success or failure code.

Remarks

Refer to Table 1.1 for the relationship between InputPort and InputConnectorSelection.

See Also

Reference

Channel
AgM9216


AgM9216_SetChannelInputPort Function

[image]

AgM9216 IVI Driver Reference Agilent Technologies
AgM9216_SetChannelInputPort Function
Channel See Also

Sets the active (physically switch) port number belonging to the channel (digitizer). Return value is integer of 1 to 32.

Function Tree Node: \AgM9216\Instrument Specific\Channel\Set Input Port
Declaration: AgM9216.h
Implementation: AgM9216.dll

Syntax

Visual C++
ViStatus AgM9216_SetChannelInputPort(
    ViSession Vi,
    ViConstString Channel,
    ViInt32 InputPort
);

Parameters

Vi

The ViSession handle that you obtain from the IviDriver_init or IviDriver_InitWithOptions function. The handle identifies a particular instrument session.

Channel

The physical or virtual repeated capability identifier. Pass VI_NULL if the operation does not apply to a repeated capability. You can also pass VI_NULL if the device only has a single channel.For valid values, see the Channel repeated capability.

InputPort

Returns the active (physically switch) port number belonging to the digitizer. Return value is integer of 1 to 32.

Return Value

Success or failure code.

Remarks

NOTE: In single channel

If the user prefer to switch using the logical port identification, use InputConnectorSelection property instead. Refer to Table 1.1 for the relationship between InputPort and InputConnectorSelection.

See Also

Reference

Channel
AgM9216


AgM9216_SetChannelRecordSize Function

[image]

AgM9216 IVI Driver Reference Agilent Technologies
AgM9216_SetChannelRecordSize Function
Channel See Also

Sets the acquisition recordSize of the Input connector of the channel (digitizer).

Function Tree Node: \AgM9216\Instrument Specific\Channel\Set Record Size
Declaration: AgM9216.h
Implementation: AgM9216.dll

Syntax

Visual C++
ViStatus AgM9216_SetChannelRecordSize(
    ViSession Vi,
    ViConstString Channel,
    ViInt32 RecordSize
);

Parameters

Vi

The ViSession handle that you obtain from the IviDriver_init or IviDriver_InitWithOptions function. The handle identifies a particular instrument session.

Channel

The physical or virtual repeated capability identifier. Pass VI_NULL if the operation does not apply to a repeated capability. You can also pass VI_NULL if the device only has a single channel.For valid values, see the Channel repeated capability.

RecordSize

Set/get the acquisition recordSize of the Input connector of the Digitizer.

Return Value

Success or failure code.

Remarks

Allowable setting.

Min: 0

Default: 5000

Max: 30000 ( Multiple Channel mode )

Max: 240000 ( SingleChannel mode )

See Also

Reference

Channel
AgM9216


Trigger

[image]

AgM9216 IVI Driver Reference Agilent Technologies
Trigger
See Also

Tree Node: \AgM9216\Instrument Specific\Channel\Trigger

Functions

 | Name | Description
Function | Set Delay | Sets the trigger hold off time.
Function | Set Hold Off Count | Sets the count of valid edges that are detected before triggering is achieved. Maximum allowable is 255
Function | Set Hysteresis | Sets the trigger level hysteresis in voltage for the currently selected connector
Function | Set Level | Sets the trigger level in voltage for the current selected connector.
Function | Set Pre Trigger Samples | Specifies the number of samples that must be collected before a trigger event will be recognized. This value must not exceed the RecordSize of the waveform.This setting is ignored if TriggerMode is AgM9216TriggerModeImmediate.
Function | Set Slope | Sets the edge type for the trigger. [Positive, Negative, Both or Level slope]
Function | Set Time Out | Sets the maximum time allowable to achieve trigger. The resolution is 1 us
Top

Attributes

 | Name | Description
Attribute | Delay | Specifies the length of time from the valid trigger event to the first point in the waveform record. The units are in microseconds. See example code in Remarks section. Note that this setting is ignored if TriggerMode is AgM9216TriggerModeImmediate.
Attribute | Hold Off Count | Specifies the number of valid edges to detect before waveform recording can occur.Note that this setting is ignored if TriggerMode is AgM9216TriggerModeImmediate
Attribute | Hysteresis | Specifies the trigger hysteresis in Volts. Note that this setting is ignored if TriggerMode is AgM9216TriggerModeImmediate.
Attribute | Level | Specifies the voltage threshold for the trigger sub-system. The units are Volts.Note that this setting is ignored if TriggerMode is AgM9216TriggerModeImmediate.
Attribute | Pre Trigger Samples | Specifies the number of samples that must be collected before a trigger event will be recognized. This value must not exceed the RecordSize of the waveform.This setting is ignored if TriggerMode is AgM9216TriggerModeImmediate.
Attribute | Slope | Specifies trigger slope for the input port as either rising edge, falling edge ,both edges or DC level.Valid values are AgM9216TriggerSlopePositive , AgM9216TriggerSlopeNegative and AgM9216TriggerSlopeBoth, AgM9216TriggerSlopeLevel .This setting is ignored if TriggerMode is AgM9216TriggerModeImmediate.
Attribute | Time Out | Specifies the maximum allowable time for the channel to detect a valid trigger condition as specified by the configuration parameters. If the trigger condition is not met, a AgM9216AcquisitionStatusTimeOut is returned as acquisition status.The units are set in multiples of one microsecond.This setting is ignored if TriggerMode is AgM9216TriggerModeImmediate.
Top

See Also

Reference

AgM9216


AGM9216_ATTR_TRIGGER_DELAY Attribute

[image]

AgM9216 IVI Driver Reference Agilent Technologies
AGM9216_ATTR_TRIGGER_DELAY Attribute
Trigger See Also

Specifies the length of time from the valid trigger event to the first point in the waveform record. The units are in microseconds. See example code in Remarks section. Note that this setting is ignored if TriggerMode is AgM9216TriggerModeImmediate.

Attribute Tree Node: \AgM9216\Instrument Specific\Channel\Trigger\Delay
Declaration: AgM9216.h
Implementation: AgM9216.dll

Syntax

Visual C++
#define AGM9216_ATTR_TRIGGER_DELAY 1150044

ViStatus AgM9216_GetAttributeViInt32(
    ViSession Vi,
    ViConstString RepCapIdentifier,
    ViAttr AttributeID,
    ViInt32* AttributeValue
);

ViStatus AgM9216_SetAttributeViInt32(
    ViSession Vi,
    ViConstString RepCapIdentifier,
    ViAttr AttributeID,
    ViInt32 AttributeValue
);

Parameters

Vi

The ViSession handle that you obtain from the IviDriver_init or IviDriver_InitWithOptions function. The handle identifies a particular instrument session.

RepCapIdentifier

A physical or virtual repeated capability identifier. For valid values, see the Channel repeated capability.

AttributeID

Must be AGM9216_ATTR_TRIGGER_DELAY.

AttributeValue (GetAttribute)

Returns the current value of the attribute. The user must specify the address of a variable that has the same data type as the attribute.

AttributeValue (SetAttribute)

The value to which to set the attribute.

Remarks

Allowable setting in microseconds.

Min: 0

Default: 0

Max: 16000000

Example

spDriver->Acquisition->Channels->Item("Channel1")->Trigger->Delay=5004 ;

The value stored for the trigger delay will be 5004 microseconds.

See Also

Reference

Trigger
AgM9216


AGM9216_ATTR_TRIGGER_HOLD_OFF_COUNT Attribute

[image]

AgM9216 IVI Driver Reference Agilent Technologies
AGM9216_ATTR_TRIGGER_HOLD_OFF_COUNT Attribute
Trigger See Also

Specifies the number of valid edges to detect before waveform recording can occur.Note that this setting is ignored if TriggerMode is AgM9216TriggerModeImmediate

Attribute Tree Node: \AgM9216\Instrument Specific\Channel\Trigger\Hold Off Count
Declaration: AgM9216.h
Implementation: AgM9216.dll

Syntax

Visual C++
#define AGM9216_ATTR_TRIGGER_HOLD_OFF_COUNT 1150041

ViStatus AgM9216_GetAttributeViInt32(
    ViSession Vi,
    ViConstString RepCapIdentifier,
    ViAttr AttributeID,
    ViInt32* AttributeValue
);

ViStatus AgM9216_SetAttributeViInt32(
    ViSession Vi,
    ViConstString RepCapIdentifier,
    ViAttr AttributeID,
    ViInt32 AttributeValue
);

Parameters

Vi

The ViSession handle that you obtain from the IviDriver_init or IviDriver_InitWithOptions function. The handle identifies a particular instrument session.

RepCapIdentifier

A physical or virtual repeated capability identifier. For valid values, see the Channel repeated capability.

AttributeID

Must be AGM9216_ATTR_TRIGGER_HOLD_OFF_COUNT.

AttributeValue (GetAttribute)

Returns the current value of the attribute. The user must specify the address of a variable that has the same data type as the attribute.

AttributeValue (SetAttribute)

The value to which to set the attribute.

Remarks

Allowable values. Errorcode will be returned if parameter is not valid.

Min: 1

Default: 1

Max: 255

See Also

Reference

Trigger
AgM9216


AGM9216_ATTR_TRIGGER_HYSTERESIS Attribute

[image]

AgM9216 IVI Driver Reference Agilent Technologies
AGM9216_ATTR_TRIGGER_HYSTERESIS Attribute
Trigger See Also

Specifies the trigger hysteresis in Volts. Note that this setting is ignored if TriggerMode is AgM9216TriggerModeImmediate.

Attribute Tree Node: \AgM9216\Instrument Specific\Channel\Trigger\Hysteresis
Declaration: AgM9216.h
Implementation: AgM9216.dll

Syntax

Visual C++
#define AGM9216_ATTR_TRIGGER_HYSTERESIS 1150040

ViStatus AgM9216_GetAttributeViReal64(
    ViSession Vi,
    ViConstString RepCapIdentifier,
    ViAttr AttributeID,
    ViReal64* AttributeValue
);

ViStatus AgM9216_SetAttributeViReal64(
    ViSession Vi,
    ViConstString RepCapIdentifier,
    ViAttr AttributeID,
    ViReal64 AttributeValue
);

Parameters

Vi

The ViSession handle that you obtain from the IviDriver_init or IviDriver_InitWithOptions function. The handle identifies a particular instrument session.

RepCapIdentifier

A physical or virtual repeated capability identifier. For valid values, see the Channel repeated capability.

AttributeID

Must be AGM9216_ATTR_TRIGGER_HYSTERESIS.

AttributeValue (GetAttribute)

Returns the current value of the attribute. The user must specify the address of a variable that has the same data type as the attribute.

AttributeValue (SetAttribute)

The value to which to set the attribute.

Remarks

Allowable values in Volts. Errorcode will be returned if parameter is not valid.

Min: 0

Default: 0.0001

Max: 0.5

See Also

Reference

Trigger
AgM9216


AGM9216_ATTR_TRIGGER_LEVEL Attribute

[image]

AgM9216 IVI Driver Reference Agilent Technologies
AGM9216_ATTR_TRIGGER_LEVEL Attribute
Trigger See Also

Specifies the voltage threshold for the trigger sub-system. The units are Volts.Note that this setting is ignored if TriggerMode is AgM9216TriggerModeImmediate.

Attribute Tree Node: \AgM9216\Instrument Specific\Channel\Trigger\Level
Declaration: AgM9216.h
Implementation: AgM9216.dll

Syntax

Visual C++
#define AGM9216_ATTR_TRIGGER_LEVEL 1150039

ViStatus AgM9216_GetAttributeViReal64(
    ViSession Vi,
    ViConstString RepCapIdentifier,
    ViAttr AttributeID,
    ViReal64* AttributeValue
);

ViStatus AgM9216_SetAttributeViReal64(
    ViSession Vi,
    ViConstString RepCapIdentifier,
    ViAttr AttributeID,
    ViReal64 AttributeValue
);

Parameters

Vi

The ViSession handle that you obtain from the IviDriver_init or IviDriver_InitWithOptions function. The handle identifies a particular instrument session.

RepCapIdentifier

A physical or virtual repeated capability identifier. For valid values, see the Channel repeated capability.

AttributeID

Must be AGM9216_ATTR_TRIGGER_LEVEL.

AttributeValue (GetAttribute)

Returns the current value of the attribute. The user must specify the address of a variable that has the same data type as the attribute.

AttributeValue (SetAttribute)

The value to which to set the attribute.

Remarks

Each channel has two concurrently active 5V and 100V subchannels during acquisition. When the absolute value of the level is set to less then 4.5V , the 5V sub-channel data will be used to determine trigger. Otherwise the 100V channel is used. An error code will be returned if the parameter is not valid. Allowable absolute values

Min: 0.0

Default: 1.0

Max: 100.0

See Also

Reference

Trigger
AgM9216


AGM9216_ATTR_TRIGGER_PRE_TRIGGER_SAMPLES Attribute

[image]

AgM9216 IVI Driver Reference Agilent Technologies
AGM9216_ATTR_TRIGGER_PRE_TRIGGER_SAMPLES Attribute
Trigger See Also

Specifies the number of samples that must be collected before a trigger event will be recognized. This value must not exceed the RecordSize of the waveform.This setting is ignored if TriggerMode is AgM9216TriggerModeImmediate.

Attribute Tree Node: \AgM9216\Instrument Specific\Channel\Trigger\Pre Trigger Samples
Declaration: AgM9216.h
Implementation: AgM9216.dll

Syntax

Visual C++
#define AGM9216_ATTR_TRIGGER_PRE_TRIGGER_SAMPLES 1150043

ViStatus AgM9216_GetAttributeViInt32(
    ViSession Vi,
    ViConstString RepCapIdentifier,
    ViAttr AttributeID,
    ViInt32* AttributeValue
);

ViStatus AgM9216_SetAttributeViInt32(
    ViSession Vi,
    ViConstString RepCapIdentifier,
    ViAttr AttributeID,
    ViInt32 AttributeValue
);

Parameters

Vi

The ViSession handle that you obtain from the IviDriver_init or IviDriver_InitWithOptions function. The handle identifies a particular instrument session.

RepCapIdentifier

A physical or virtual repeated capability identifier. For valid values, see the Channel repeated capability.

AttributeID

Must be AGM9216_ATTR_TRIGGER_PRE_TRIGGER_SAMPLES.

AttributeValue (GetAttribute)

Returns the current value of the attribute. The user must specify the address of a variable that has the same data type as the attribute.

AttributeValue (SetAttribute)

The value to which to set the attribute.

Remarks

Min: 0

Default: 0

Max: RecordSize

See Also

Reference

Trigger
AgM9216


AgM9216_SetTriggerDelay Function

[image]

AgM9216 IVI Driver Reference Agilent Technologies
AgM9216_SetTriggerDelay Function
Trigger See Also

Sets the trigger hold off time.

Function Tree Node: \AgM9216\Instrument Specific\Channel\Trigger\Set Delay
Declaration: AgM9216.h
Implementation: AgM9216.dll

Syntax

Visual C++
ViStatus AgM9216_SetTriggerDelay(
    ViSession Vi,
    ViConstString Channel,
    ViInt32 Delay
);

Parameters

Vi

The ViSession handle that you obtain from the IviDriver_init or IviDriver_InitWithOptions function. The handle identifies a particular instrument session.

Channel

The physical or virtual repeated capability identifier. Pass VI_NULL if the operation does not apply to a repeated capability. You can also pass VI_NULL if the device only has a single channel.For valid values, see the Channel repeated capability.

Delay

Hold off time.

Return Value

Success or failure code.

Remarks

Allowable setting in microseconds.

Min: 0

Default: 0

Max: 16000000

Example

spDriver->Acquisition->Channels->Item("Channel1")->Trigger->Delay=5004 ;

The value stored for the trigger delay will be 5004 microseconds.

See Also

Reference

Trigger
AgM9216


AgM9216_SetTriggerHoldOffCount Function

[image]

AgM9216 IVI Driver Reference Agilent Technologies
AgM9216_SetTriggerHoldOffCount Function
Trigger See Also

Sets the count of valid edges that are detected before triggering is achieved. Maximum allowable is 255

Function Tree Node: \AgM9216\Instrument Specific\Channel\Trigger\Set Hold Off Count
Declaration: AgM9216.h
Implementation: AgM9216.dll

Syntax

Visual C++
ViStatus AgM9216_SetTriggerHoldOffCount(
    ViSession Vi,
    ViConstString Channel,
    ViInt32 HoldOffCount
);

Parameters

Vi

The ViSession handle that you obtain from the IviDriver_init or IviDriver_InitWithOptions function. The handle identifies a particular instrument session.

Channel

The physical or virtual repeated capability identifier. Pass VI_NULL if the operation does not apply to a repeated capability. You can also pass VI_NULL if the device only has a single channel.For valid values, see the Channel repeated capability.

HoldOffCount

Returns the count of valid edges that are detected before triggering is achieved. Maximum allowable is 255

Return Value

Success or failure code.

Remarks

Allowable values. Errorcode will be returned if parameter is not valid.

Min: 1

Default: 1

Max: 255

See Also

Reference

Trigger
AgM9216


AgM9216_SetTriggerHysteresis Function

[image]

AgM9216 IVI Driver Reference Agilent Technologies
AgM9216_SetTriggerHysteresis Function
Trigger See Also

Sets the trigger level hysteresis in voltage for the currently selected connector

Function Tree Node: \AgM9216\Instrument Specific\Channel\Trigger\Set Hysteresis
Declaration: AgM9216.h
Implementation: AgM9216.dll

Syntax

Visual C++
ViStatus AgM9216_SetTriggerHysteresis(
    ViSession Vi,
    ViConstString Channel,
    ViReal64 Hysteresis
);

Parameters

Vi

The ViSession handle that you obtain from the IviDriver_init or IviDriver_InitWithOptions function. The handle identifies a particular instrument session.

Channel

The physical or virtual repeated capability identifier. Pass VI_NULL if the operation does not apply to a repeated capability. You can also pass VI_NULL if the device only has a single channel.For valid values, see the Channel repeated capability.

Hysteresis

Returns the trigger level hysteresis in voltage for the currently selected connector

Return Value

Success or failure code.

Remarks

Allowable values in Volts. Errorcode will be returned if parameter is not valid.

Min: 0

Default: 0.0001

Max: 0.5

See Also

Reference

Trigger
AgM9216


AgM9216_SetTriggerLevel Function

[image]

AgM9216 IVI Driver Reference Agilent Technologies
AgM9216_SetTriggerLevel Function
Trigger See Also

Sets the trigger level in voltage for the current selected connector.

Function Tree Node: \AgM9216\Instrument Specific\Channel\Trigger\Set Level
Declaration: AgM9216.h
Implementation: AgM9216.dll

Syntax

Visual C++
ViStatus AgM9216_SetTriggerLevel(
    ViSession Vi,
    ViConstString Channel,
    ViReal64 Level
);

Parameters

Vi

The ViSession handle that you obtain from the IviDriver_init or IviDriver_InitWithOptions function. The handle identifies a particular instrument session.

Channel

The physical or virtual repeated capability identifier. Pass VI_NULL if the operation does not apply to a repeated capability. You can also pass VI_NULL if the device only has a single channel.For valid values, see the Channel repeated capability.

Level

Returns the trigger level in voltage for the current selected connector.

Return Value

Success or failure code.

Remarks

Each channel has two concurrently active 5V and 100V subchannels during acquisition. When the absolute value of the level is set to less then 4.5V , the 5V sub-channel data will be used to determine trigger. Otherwise the 100V channel is used. An error code will be returned if the parameter is not valid. Allowable absolute values

Min: 0.0

Default: 1.0

Max: 100.0

See Also

Reference

Trigger
AgM9216


AgM9216_SetTriggerPreTriggerSamples Function

[image]

AgM9216 IVI Driver Reference Agilent Technologies
AgM9216_SetTriggerPreTriggerSamples Function
Trigger See Also

Specifies the number of samples that must be collected before a trigger event will be recognized. This value must not exceed the RecordSize of the waveform.This setting is ignored if TriggerMode is AgM9216TriggerModeImmediate.

Function Tree Node: \AgM9216\Instrument Specific\Channel\Trigger\Set Pre Trigger Samples
Declaration: AgM9216.h
Implementation: AgM9216.dll

Syntax

Visual C++
ViStatus AgM9216_SetTriggerPreTriggerSamples(
    ViSession Vi,
    ViConstString Channel,
    ViInt32 PreTriggerSamples
);

Parameters

Vi

The ViSession handle that you obtain from the IviDriver_init or IviDriver_InitWithOptions function. The handle identifies a particular instrument session.

Channel

The physical or virtual repeated capability identifier. Pass VI_NULL if the operation does not apply to a repeated capability. You can also pass VI_NULL if the device only has a single channel.For valid values, see the Channel repeated capability.

PreTriggerSamples

Specifies the number of samples that must be collected before a trigger event will be recognized. This value must not exceed the RecordSize of the waveform.This setting is ignored if TriggerMode is AgM9216TriggerModeImmediate

Return Value

Success or failure code.

Remarks

Min: 0

Default: 0

Max: RecordSize

See Also

Reference

Trigger
AgM9216


AgM9216_SetTriggerSlope Function

[image]

AgM9216 IVI Driver Reference Agilent Technologies
AgM9216_SetTriggerSlope Function
Trigger See Also

Sets the edge type for the trigger. [Positive, Negative, Both or Level slope]

Function Tree Node: \AgM9216\Instrument Specific\Channel\Trigger\Set Slope
Declaration: AgM9216.h
Implementation: AgM9216.dll

Syntax

Visual C++
ViStatus AgM9216_SetTriggerSlope(
    ViSession Vi,
    ViConstString Channel,
    ViInt32 Slope
);

Parameters

Vi

The ViSession handle that you obtain from the IviDriver_init or IviDriver_InitWithOptions function. The handle identifies a particular instrument session.

Channel

The physical or virtual repeated capability identifier. Pass VI_NULL if the operation does not apply to a repeated capability. You can also pass VI_NULL if the device only has a single channel.For valid values, see the Channel repeated capability.

Slope

Gets the edge type for the trigger. [Positive, Negative, Both or Level slope]

Return Value

Success or failure code.

Defined Values For Parameter Slope

Name | Description
AGM9216_VAL_TRIGGER_SLOPE_POSITIVE | Configures trigger on the Positive slope.
AGM9216_VAL_TRIGGER_SLOPE_NEGATIVE | Configures trigger on the Negative slope.
AGM9216_VAL_TRIGGER_SLOPE_BOTH | Configures trigger on the both.
AGM9216_VAL_TRIGGER_SLOPE_LEVEL | Configures trigger on the DC level slope.
Top

See Also

Reference

Trigger
AgM9216


AgM9216_SetTriggerTimeOut Function

[image]

AgM9216 IVI Driver Reference Agilent Technologies
AgM9216_SetTriggerTimeOut Function
Trigger See Also

Sets the maximum time allowable to achieve trigger. The resolution is 1 us

Function Tree Node: \AgM9216\Instrument Specific\Channel\Trigger\Set Time Out
Declaration: AgM9216.h
Implementation: AgM9216.dll

Syntax

Visual C++
ViStatus AgM9216_SetTriggerTimeOut(
    ViSession Vi,
    ViConstString Channel,
    ViInt32 TimeOut
);

Parameters

Vi

The ViSession handle that you obtain from the IviDriver_init or IviDriver_InitWithOptions function. The handle identifies a particular instrument session.

Channel

The physical or virtual repeated capability identifier. Pass VI_NULL if the operation does not apply to a repeated capability. You can also pass VI_NULL if the device only has a single channel.For valid values, see the Channel repeated capability.

TimeOut

Get the maximum time allowable to achieve trigger. The resolution is 1 us

Return Value

Success or failure code.

Remarks

Min: 0

Default: 1000000 (1 s)

Max: 16000000 (16 s)

A zero setting will cause the channel to timeout immediately, and no measurement will be made on that channel. Note that when the M9216 is in AgM9216MeasurementModeMultiple mode , the longest TimeOut setting of all the eight channels will determine the maximum period WaitForAcquisitionToComplete waits before returning.

See Also

Reference

Trigger
AgM9216


AGM9216_ATTR_TRIGGER_SLOPE Attribute

[image]

AgM9216 IVI Driver Reference Agilent Technologies
AGM9216_ATTR_TRIGGER_SLOPE Attribute
Trigger See Also

Specifies trigger slope for the input port as either rising edge, falling edge ,both edges or DC level.Valid values are AgM9216TriggerSlopePositive , AgM9216TriggerSlopeNegative and AgM9216TriggerSlopeBoth, AgM9216TriggerSlopeLevel .This setting is ignored if TriggerMode is AgM9216TriggerModeImmediate.

Attribute Tree Node: \AgM9216\Instrument Specific\Channel\Trigger\Slope
Declaration: AgM9216.h
Implementation: AgM9216.dll

Syntax

Visual C++
#define AGM9216_ATTR_TRIGGER_SLOPE 1150045

ViStatus AgM9216_GetAttributeViInt32(
    ViSession Vi,
    ViConstString RepCapIdentifier,
    ViAttr AttributeID,
    ViInt32* AttributeValue
);

ViStatus AgM9216_SetAttributeViInt32(
    ViSession Vi,
    ViConstString RepCapIdentifier,
    ViAttr AttributeID,
    ViInt32 AttributeValue
);

Parameters

Vi

The ViSession handle that you obtain from the IviDriver_init or IviDriver_InitWithOptions function. The handle identifies a particular instrument session.

RepCapIdentifier

A physical or virtual repeated capability identifier. For valid values, see the Channel repeated capability.

AttributeID

Must be AGM9216_ATTR_TRIGGER_SLOPE.

AttributeValue (GetAttribute)

Returns the current value of the attribute. The user must specify the address of a variable that has the same data type as the attribute.

AttributeValue (SetAttribute)

The value to which to set the attribute.

Defined Values

Name | Description
AGM9216_VAL_TRIGGER_SLOPE_POSITIVE | Configures trigger on the Positive slope.
AGM9216_VAL_TRIGGER_SLOPE_NEGATIVE | Configures trigger on the Negative slope.
AGM9216_VAL_TRIGGER_SLOPE_BOTH | Configures trigger on the both.
AGM9216_VAL_TRIGGER_SLOPE_LEVEL | Configures trigger on the DC level slope.
Top

See Also

Reference

Trigger
AgM9216


AGM9216_ATTR_TRIGGER_TIME_OUT Attribute

[image]

AgM9216 IVI Driver Reference Agilent Technologies
AGM9216_ATTR_TRIGGER_TIME_OUT Attribute
Trigger See Also

Specifies the maximum allowable time for the channel to detect a valid trigger condition as specified by the configuration parameters. If the trigger condition is not met, a AgM9216AcquisitionStatusTimeOut is returned as acquisition status.The units are set in multiples of one microsecond.This setting is ignored if TriggerMode is AgM9216TriggerModeImmediate.

Attribute Tree Node: \AgM9216\Instrument Specific\Channel\Trigger\Time Out
Declaration: AgM9216.h
Implementation: AgM9216.dll

Syntax

Visual C++
#define AGM9216_ATTR_TRIGGER_TIME_OUT 1150042

ViStatus AgM9216_GetAttributeViInt32(
    ViSession Vi,
    ViConstString RepCapIdentifier,
    ViAttr AttributeID,
    ViInt32* AttributeValue
);

ViStatus AgM9216_SetAttributeViInt32(
    ViSession Vi,
    ViConstString RepCapIdentifier,
    ViAttr AttributeID,
    ViInt32 AttributeValue
);

Parameters

Vi

The ViSession handle that you obtain from the IviDriver_init or IviDriver_InitWithOptions function. The handle identifies a particular instrument session.

RepCapIdentifier

A physical or virtual repeated capability identifier. For valid values, see the Channel repeated capability.

AttributeID

Must be AGM9216_ATTR_TRIGGER_TIME_OUT.

AttributeValue (GetAttribute)

Returns the current value of the attribute. The user must specify the address of a variable that has the same data type as the attribute.

AttributeValue (SetAttribute)

The value to which to set the attribute.

Remarks

Min: 0

Default: 1000000 (1 s)

Max: 16000000 (16 s)

A zero setting will cause the channel to timeout immediately, and no measurement will be made on that channel. Note that when the M9216 is in AgM9216MeasurementModeMultiple mode , the longest TimeOut setting of all the eight channels will determine the maximum period WaitForAcquisitionToComplete waits before returning.

See Also

Reference

Trigger
AgM9216


AGM9216_ATTR_MEASUREMENT_MODE Attribute

[image]

AgM9216 IVI Driver Reference Agilent Technologies
AGM9216_ATTR_MEASUREMENT_MODE Attribute
Instrument Specific See Also

This property determines whether the M9216A is set in Single channel or Multiple Channel personality. When this property is changed, the device's configuration properties will be reinitialized to the default settings. InputConnector for all channels will be set to 1. An update hardware command will also be sent to the hardware.

Attribute Tree Node: \AgM9216\Instrument Specific\Measurement Mode
Declaration: AgM9216.h
Implementation: AgM9216.dll

Syntax

Visual C++
#define AGM9216_ATTR_MEASUREMENT_MODE 1150031

ViStatus AgM9216_GetAttributeViInt32(
    ViSession Vi,
    ViConstString RepCapIdentifier,
    ViAttr AttributeID,
    ViInt32* AttributeValue
);

ViStatus AgM9216_SetAttributeViInt32(
    ViSession Vi,
    ViConstString RepCapIdentifier,
    ViAttr AttributeID,
    ViInt32 AttributeValue
);

Parameters

Vi

The ViSession handle that you obtain from the IviDriver_init or IviDriver_InitWithOptions function. The handle identifies a particular instrument session.

RepCapIdentifier

Must be VI_NULL or an empty string. This attribute is not defined on a repeated capability.

AttributeID

Must be AGM9216_ATTR_MEASUREMENT_MODE.

AttributeValue (GetAttribute)

Returns the current value of the attribute. The user must specify the address of a variable that has the same data type as the attribute.

AttributeValue (SetAttribute)

The value to which to set the attribute.

Remarks

In the Single Channel mode, the M9216A will utilize all the hardware's acquisition memory for a single channel. This allows a maximum of 240000 samples RecordSize. However user are only allowed to use one channel at a time. Use this mode only when a large RecordSize is required.

Defined Values

Name | Description
AGM9216_VAL_MEASUREMENT_MODE_SINGLE | sets Single channel measurement mode
AGM9216_VAL_MEASUREMENT_MODE_MULTIPLE | sets Multiple channels measurement mode
Top

See Also

Reference

Instrument Specific
AgM9216


AgM9216_SetMeasurementMode Function

[image]

AgM9216 IVI Driver Reference Agilent Technologies
AgM9216_SetMeasurementMode Function
Instrument Specific See Also

Sets the Measurement mode (Single channel) or (Multiple Channel).

Function Tree Node: \AgM9216\Instrument Specific\Set Measurement Mode
Declaration: AgM9216.h
Implementation: AgM9216.dll

Syntax

Visual C++
ViStatus AgM9216_SetMeasurementMode(
    ViSession Vi,
    ViInt32 MeasurementMode
);

Parameters

Vi

The ViSession handle that you obtain from the IviDriver_init or IviDriver_InitWithOptions function. The handle identifies a particular instrument session.

MeasurementMode

Set/Get the Measurement mode (Single channel) or (MultiChannel/Group).

Return Value

Success or failure code.

Remarks

In the Single Channel mode, the M9216A will utilize all the hardware's acquisition memory for a single channel. This allows a maximum of 240000 samples RecordSize. However user are only allowed to use one channel at a time. Use this mode only when a large RecordSize is required.

Defined Values For Parameter MeasurementMode

Name | Description
AGM9216_VAL_MEASUREMENT_MODE_SINGLE | sets Single channel measurement mode
AGM9216_VAL_MEASUREMENT_MODE_MULTIPLE | sets Multiple channels measurement mode
Top

See Also

Reference

Instrument Specific
AgM9216


AgM9216_SetTriggerMode Function

[image]

AgM9216 IVI Driver Reference Agilent Technologies
AgM9216_SetTriggerMode Function
Instrument Specific See Also

Sets the M9216A in immediate or trigger(Channel) mode.

Function Tree Node: \AgM9216\Instrument Specific\Set Trigger Mode
Declaration: AgM9216.h
Implementation: AgM9216.dll

Syntax

Visual C++
ViStatus AgM9216_SetTriggerMode(
    ViSession Vi,
    ViInt32 TriggerMode
);

Parameters

Vi

The ViSession handle that you obtain from the IviDriver_init or IviDriver_InitWithOptions function. The handle identifies a particular instrument session.

TriggerMode

Determines whether the M9216A is in immediate or trigger(Channel) mode.

Return Value

Success or failure code.

Remarks

This property is a global setting and affects every channel of the M9216A. Changing Trigger Mode does NOT cause a hardware reset to be issued.

Defined Values For Parameter TriggerMode

Name | Description
AGM9216_VAL_TRIGGER_MODE_CHANNEL | Each channel waits for a valid trigger from its source signal before acquiring data..
AGM9216_VAL_TRIGGER_MODE_IMMEDIATE | Channels start waveform aquisiton immediately
Top

See Also

Reference

Instrument Specific
AgM9216


System

[image]

AgM9216 IVI Driver Reference Agilent Technologies
System
See Also

Tree Node: \AgM9216\Instrument Specific\System

Attributes

 | Name | Description
Attribute | System Board Revision | -- READ ONLY -- Returns the PCB version.
Attribute | System Calibation Date | -- READ ONLY -- Returns the Calibration Date from EEPROM.
Attribute | System Driver Revision | -- READ ONLY -- Returns the fundamental driver revision.
Attribute | System Fpga Revision | -- READ ONLY -- Returns the FPGA firmware version.
Attribute | System Serial Number | -- READ ONLY -- Returns the serial number of the module.
Attribute | System Slot Number | -- READ ONLY -- Returns the the slot number of the card.
Attribute | System Trace Enabled | If true, outputs a trace log of all driver calls to an xml file in the same directory as the application executable accessing the driver. Generates default unique file names based on date and time. A new file is generated each time tracing is enabled.
Top

See Also

Reference

AgM9216


AGM9216_ATTR_SYSTEM_BOARD_REVISION Attribute

[image]

AgM9216 IVI Driver Reference Agilent Technologies
AGM9216_ATTR_SYSTEM_BOARD_REVISION Attribute
System See Also

-- READ ONLY -- Returns the PCB version.

Attribute Tree Node: \AgM9216\Instrument Specific\System\System Board Revision
Declaration: AgM9216.h
Implementation: AgM9216.dll

Syntax

Visual C++
#define AGM9216_ATTR_SYSTEM_BOARD_REVISION 1150006

ViStatus AgM9216_GetAttributeViString(
    ViSession Vi,
    ViConstString RepCapIdentifier,
    ViAttr AttributeID,
    ViInt32 AttributeValueBufferSize,
    ViChar[] AttributeValue
);

Parameters

Vi

The ViSession handle that you obtain from the IviDriver_init or IviDriver_InitWithOptions function. The handle identifies a particular instrument session.

RepCapIdentifier

Must be VI_NULL or an empty string. This attribute is not defined on a repeated capability.

AttributeID

Must be AGM9216_ATTR_SYSTEM_BOARD_REVISION.

AttributeValueBufferSize

The number of bytes in the ViChar array that the user specifies for the AttributeValue parameter.

AttributeValue

The buffer in which the function returns the current value of the attribute. Can be VI_NULL if AttributeValueBufferSize is 0.

Remarks

You may also enable tracing and specify additional options when initializing the driver. See 'Driver Setup' options on the Initializing the IVI-COM Driver page for more details.

See Also

Reference

System
AgM9216


AGM9216_ATTR_SYSTEM_CALIBATION_DATE Attribute

[image]

AgM9216 IVI Driver Reference Agilent Technologies
AGM9216_ATTR_SYSTEM_CALIBATION_DATE Attribute
System See Also

-- READ ONLY -- Returns the Calibration Date from EEPROM.

Attribute Tree Node: \AgM9216\Instrument Specific\System\System Calibation Date
Declaration: AgM9216.h
Implementation: AgM9216.dll

Syntax

Visual C++
#define AGM9216_ATTR_SYSTEM_CALIBATION_DATE 1150008

ViStatus AgM9216_GetAttributeViString(
    ViSession Vi,
    ViConstString RepCapIdentifier,
    ViAttr AttributeID,
    ViInt32 AttributeValueBufferSize,
    ViChar[] AttributeValue
);

Parameters

Vi

The ViSession handle that you obtain from the IviDriver_init or IviDriver_InitWithOptions function. The handle identifies a particular instrument session.

RepCapIdentifier

Must be VI_NULL or an empty string. This attribute is not defined on a repeated capability.

AttributeID

Must be AGM9216_ATTR_SYSTEM_CALIBATION_DATE.

AttributeValueBufferSize

The number of bytes in the ViChar array that the user specifies for the AttributeValue parameter.

AttributeValue

The buffer in which the function returns the current value of the attribute. Can be VI_NULL if AttributeValueBufferSize is 0.

See Also

Reference

System
AgM9216


AGM9216_ATTR_SYSTEM_DRIVER_REVISION Attribute

[image]

AgM9216 IVI Driver Reference Agilent Technologies
AGM9216_ATTR_SYSTEM_DRIVER_REVISION Attribute
System See Also

-- READ ONLY -- Returns the fundamental driver revision.

Attribute Tree Node: \AgM9216\Instrument Specific\System\System Driver Revision
Declaration: AgM9216.h
Implementation: AgM9216.dll

Syntax

Visual C++
#define AGM9216_ATTR_SYSTEM_DRIVER_REVISION 1150005

ViStatus AgM9216_GetAttributeViString(
    ViSession Vi,
    ViConstString RepCapIdentifier,
    ViAttr AttributeID,
    ViInt32 AttributeValueBufferSize,
    ViChar[] AttributeValue
);

Parameters

Vi

The ViSession handle that you obtain from the IviDriver_init or IviDriver_InitWithOptions function. The handle identifies a particular instrument session.

RepCapIdentifier

Must be VI_NULL or an empty string. This attribute is not defined on a repeated capability.

AttributeID

Must be AGM9216_ATTR_SYSTEM_DRIVER_REVISION.

AttributeValueBufferSize

The number of bytes in the ViChar array that the user specifies for the AttributeValue parameter.

AttributeValue

The buffer in which the function returns the current value of the attribute. Can be VI_NULL if AttributeValueBufferSize is 0.

See Also

Reference

System
AgM9216


AGM9216_ATTR_SYSTEM_FPGA_REVISION Attribute

[image]

AgM9216 IVI Driver Reference Agilent Technologies
AGM9216_ATTR_SYSTEM_FPGA_REVISION Attribute
System See Also

-- READ ONLY -- Returns the FPGA firmware version.

Attribute Tree Node: \AgM9216\Instrument Specific\System\System Fpga Revision
Declaration: AgM9216.h
Implementation: AgM9216.dll

Syntax

Visual C++
#define AGM9216_ATTR_SYSTEM_FPGA_REVISION 1150009

ViStatus AgM9216_GetAttributeViString(
    ViSession Vi,
    ViConstString RepCapIdentifier,
    ViAttr AttributeID,
    ViInt32 AttributeValueBufferSize,
    ViChar[] AttributeValue
);

Parameters

Vi

The ViSession handle that you obtain from the IviDriver_init or IviDriver_InitWithOptions function. The handle identifies a particular instrument session.

RepCapIdentifier

Must be VI_NULL or an empty string. This attribute is not defined on a repeated capability.

AttributeID

Must be AGM9216_ATTR_SYSTEM_FPGA_REVISION.

AttributeValueBufferSize

The number of bytes in the ViChar array that the user specifies for the AttributeValue parameter.

AttributeValue

The buffer in which the function returns the current value of the attribute. Can be VI_NULL if AttributeValueBufferSize is 0.

See Also

Reference

System
AgM9216


AGM9216_ATTR_SYSTEM_SERIAL_NUMBER Attribute

[image]

AgM9216 IVI Driver Reference Agilent Technologies
AGM9216_ATTR_SYSTEM_SERIAL_NUMBER Attribute
System See Also

-- READ ONLY -- Returns the serial number of the module.

Attribute Tree Node: \AgM9216\Instrument Specific\System\System Serial Number
Declaration: AgM9216.h
Implementation: AgM9216.dll

Syntax

Visual C++
#define AGM9216_ATTR_SYSTEM_SERIAL_NUMBER 1150001

ViStatus AgM9216_GetAttributeViString(
    ViSession Vi,
    ViConstString RepCapIdentifier,
    ViAttr AttributeID,
    ViInt32 AttributeValueBufferSize,
    ViChar[] AttributeValue
);

Parameters

Vi

The ViSession handle that you obtain from the IviDriver_init or IviDriver_InitWithOptions function. The handle identifies a particular instrument session.

RepCapIdentifier

Must be VI_NULL or an empty string. This attribute is not defined on a repeated capability.

AttributeID

Must be AGM9216_ATTR_SYSTEM_SERIAL_NUMBER.

AttributeValueBufferSize

The number of bytes in the ViChar array that the user specifies for the AttributeValue parameter.

AttributeValue

The buffer in which the function returns the current value of the attribute. Can be VI_NULL if AttributeValueBufferSize is 0.

See Also

Reference

System
AgM9216


AGM9216_ATTR_SYSTEM_SLOT_NUMBER Attribute

[image]

AgM9216 IVI Driver Reference Agilent Technologies
AGM9216_ATTR_SYSTEM_SLOT_NUMBER Attribute
System See Also

-- READ ONLY -- Returns the the slot number of the card.

Attribute Tree Node: \AgM9216\Instrument Specific\System\System Slot Number
Declaration: AgM9216.h
Implementation: AgM9216.dll

Syntax

Visual C++
#define AGM9216_ATTR_SYSTEM_SLOT_NUMBER 1150007

ViStatus AgM9216_GetAttributeViInt32(
    ViSession Vi,
    ViConstString RepCapIdentifier,
    ViAttr AttributeID,
    ViInt32* AttributeValue
);

Parameters

Vi

The ViSession handle that you obtain from the IviDriver_init or IviDriver_InitWithOptions function. The handle identifies a particular instrument session.

RepCapIdentifier

Must be VI_NULL or an empty string. This attribute is not defined on a repeated capability.

AttributeID

Must be AGM9216_ATTR_SYSTEM_SLOT_NUMBER.

AttributeValue

Returns the current value of the attribute. The user must specify the address of a variable that has the same data type as the attribute.

See Also

Reference

System
AgM9216


AGM9216_ATTR_SYSTEM_TRACE_ENABLED Attribute

[image]

AgM9216 IVI Driver Reference Agilent Technologies
AGM9216_ATTR_SYSTEM_TRACE_ENABLED Attribute
System See Also

If true, outputs a trace log of all driver calls to an xml file in the same directory as the application executable accessing the driver. Generates default unique file names based on date and time. A new file is generated each time tracing is enabled.

Attribute Tree Node: \AgM9216\Instrument Specific\System\System Trace Enabled
Declaration: AgM9216.h
Implementation: AgM9216.dll

Syntax

Visual C++
#define AGM9216_ATTR_SYSTEM_TRACE_ENABLED 1150002

ViStatus AgM9216_GetAttributeViBoolean(
    ViSession Vi,
    ViConstString RepCapIdentifier,
    ViAttr AttributeID,
    ViBoolean* AttributeValue
);

ViStatus AgM9216_SetAttributeViBoolean(
    ViSession Vi,
    ViConstString RepCapIdentifier,
    ViAttr AttributeID,
    ViBoolean AttributeValue
);

Parameters

Vi

The ViSession handle that you obtain from the IviDriver_init or IviDriver_InitWithOptions function. The handle identifies a particular instrument session.

RepCapIdentifier

Must be VI_NULL or an empty string. This attribute is not defined on a repeated capability.

AttributeID

Must be AGM9216_ATTR_SYSTEM_TRACE_ENABLED.

AttributeValue (GetAttribute)

Returns the current value of the attribute. The user must specify the address of a variable that has the same data type as the attribute.

AttributeValue (SetAttribute)

The value to which to set the attribute.

Remarks

You may also enable tracing, specify a file name and path, and additional trace options when initializing the driver. For complete information on Initialize tracing options see the 'Driver Setup' section on the Initializing the IVI-C Driver page.

See Also

Reference

System
AgM9216


AGM9216_ATTR_TRIGGER_MODE Attribute

[image]

AgM9216 IVI Driver Reference Agilent Technologies
AGM9216_ATTR_TRIGGER_MODE Attribute
Instrument Specific See Also

This property sets whether the M9216A channels uses the trigger level settings to perform the measurement, or to instead acquire data immediately upon receiving the Initiate command.

Attribute Tree Node: \AgM9216\Instrument Specific\Trigger Mode
Declaration: AgM9216.h
Implementation: AgM9216.dll

Syntax

Visual C++
#define AGM9216_ATTR_TRIGGER_MODE 1150030

ViStatus AgM9216_GetAttributeViInt32(
    ViSession Vi,
    ViConstString RepCapIdentifier,
    ViAttr AttributeID,
    ViInt32* AttributeValue
);

ViStatus AgM9216_SetAttributeViInt32(
    ViSession Vi,
    ViConstString RepCapIdentifier,
    ViAttr AttributeID,
    ViInt32 AttributeValue
);

Parameters

Vi

The ViSession handle that you obtain from the IviDriver_init or IviDriver_InitWithOptions function. The handle identifies a particular instrument session.

RepCapIdentifier

Must be VI_NULL or an empty string. This attribute is not defined on a repeated capability.

AttributeID

Must be AGM9216_ATTR_TRIGGER_MODE.

AttributeValue (GetAttribute)

Returns the current value of the attribute. The user must specify the address of a variable that has the same data type as the attribute.

AttributeValue (SetAttribute)

The value to which to set the attribute.

Remarks

This property is a global setting and affects every channel of the M9216A. Changing Trigger Mode does NOT cause a hardware reset to be issued.

Defined Values

Name | Description
AGM9216_VAL_TRIGGER_MODE_CHANNEL | Each channel waits for a valid trigger from its source signal before acquiring data..
AGM9216_VAL_TRIGGER_MODE_IMMEDIATE | Channels start waveform aquisiton immediately
Top

See Also

Reference

Instrument Specific
AgM9216


AgM9216_UpdateHardware Function

[image]

AgM9216 IVI Driver Reference Agilent Technologies
AgM9216_UpdateHardware Function
Instrument Specific See Also

Loads the digitizer configuration and connector selection into the hardware. All changes to configuration settings and connector selection are cached in the host driver until this command is called. This command effectively synchronizes the host driver and hardware.

Function Tree Node: \AgM9216\Instrument Specific\Update Hardware
Declaration: AgM9216.h
Implementation: AgM9216.dll

Syntax

Visual C++
ViStatus AgM9216_UpdateHardware(
    ViSession Vi
);

Parameters

Vi

The ViSession handle that you obtain from the IviDriver_init or IviDriver_InitWithOptions function. The handle identifies a particular instrument session.

Return Value

Success or failure code.

Remarks

Only the lastest property value for each channel will be effected into hardware since the driver stores only the last change. For example the following code snippet below will result in connector 1 of channel 1 being selected for acquisition.

[psuedo code]

spDriver->Acquisition->Channels->Item("Channel1")->InputConnectorSelection=2;

spDriver->Acquisition->Channels->Item("Channel1")->InputConnectorSelection=1;

spDriver->UpdateHardware();

Allow a 1ms settling time for relay debouncing if inputPort(s) for each channel have been changed before Initiating Acquisition.

See Also

Reference

Instrument Specific
AgM9216


Utility

[image]

AgM9216 IVI Driver Reference Agilent Technologies
Utility
See Also

Tree Node: \AgM9216\Utility

Functions

 | Name | Description
Function | Clear Error | This function clears the error code and error description for the current execution thread and for the IVI session. If the user specifies a valid IVI session for the Vi parameter, this function clears the error information for the session. If the user passes VI_NULL for the Vi parameter, this function clears the error information for the current execution thread. If the Vi parameter is an invalid session, the function does nothing and returns an error.
Function | Clear Interchange Warnings | Clears the list of interchangeability warnings that the IVI specific driver maintains.
Function | Disable | --NOT SUPPORTED-- Quickly places the instrument in a state where it has no, or minimal, effect on the external system to which it is connected. This state is not necessarily a known state.
Function | Error Message | Translates the error return value from an IVI driver function to a user-readable string. The user should pass a buffer with at least 256 bytes for the ErrorMessage parameter.
Function | Error Query | --NOT SUPPORTED-- Queries the instrument and returns instrument specific error information. This function can be used when QueryInstrumentStatus is True to retrieve error details when the driver detects an instrument error.
Function | Get Error | This function retrieves and then clears the IVI error information for the session or the current execution thread. If the user specifies a valid IVI session for the Vi parameter, Get Error retrieves and then clears the error information for the session. If the user passes VI_NULL for the Vi parameter, Get Error retrieves and then clears the error information for the current execution thread. If the Vi parameter is an invalid session, the function does nothing and returns an error. Normally, the error information describes the first error that occurred since the user last called the Get Error or Clear Error function.
Function | Get Next Coercion Record | Returns the oldest record from the coercion record list. Records are only added to the list if RecordCoercions is True.
Function | Get Next Interchange Warning | Returns the oldest warning from the interchange warning list. Records are only added to the list if InterchangeCheck is True.
Function | Invalidate All Attributes | Invalidates all of the driver's cached values.
Function | Lock Session | Obtains a multithread lock on the driver after waiting until all other execution threads have released their locks on the instrument session.
Function | Reset | Places the M9216 into a known state.
Function | Reset Interchange Check | Resets the interchangeability checking algorithms of the driver so that methods and properties that executed prior to calling this function have no affect on whether future calls to the driver generate interchangeability warnings.
Function | Reset With Defaults | This function resets the M9216. All ports and properties will be set to the default values. A UpDateHardware command will be sent. This method needs to be called once when the M9216A is first started up.
Function | Revision Query | Retrieves revision information from the instrument.
Function | Self Test | --NOT SUPPORTED-- Performs an instrument self test, waits for the instrument to complete the test, and queries the instrument for the results. If the instrument passes the test, TestResult is zero and TestMessage is 'Self test passed'.
Function | Unlock Session | Releases a previously obtained mutlithread lock.
Top

See Also

Reference

AgM9216


AgM9216_ClearError Function

[image]

AgM9216 IVI Driver Reference Agilent Technologies
AgM9216_ClearError Function
Utility See Also

This function clears the error code and error description for the current execution thread and for the IVI session. If the user specifies a valid IVI session for the Vi parameter, this function clears the error information for the session. If the user passes VI_NULL for the Vi parameter, this function clears the error information for the current execution thread. If the Vi parameter is an invalid session, the function does nothing and returns an error.

Function Tree Node: \AgM9216\Utility\Clear Error
Declaration: AgM9216.h
Implementation: AgM9216.dll

Syntax

Visual C++
ViStatus AgM9216_ClearError(
    ViSession Vi
);

Parameters

Vi

The ViSession handle that you obtain from the IviDriver_init or IviDriver_InitWithOptions function. The handle identifies a particular instrument session.

Return Value

Success or failure code.

See Also

Reference

Utility
AgM9216


AgM9216_ClearInterchangeWarnings Function

[image]

AgM9216 IVI Driver Reference Agilent Technologies
AgM9216_ClearInterchangeWarnings Function
Utility See Also

Clears the list of interchangeability warnings that the IVI specific driver maintains.

Function Tree Node: \AgM9216\Utility\Clear Interchange Warnings
Declaration: AgM9216.h
Implementation: AgM9216.dll

Syntax

Visual C++
ViStatus AgM9216_ClearInterchangeWarnings(
    ViSession Vi
);

Parameters

Vi

The ViSession handle that you obtain from the IviDriver_init or IviDriver_InitWithOptions function. The handle identifies a particular instrument session.

Return Value

Success or failure code.

See Also

Reference

Utility
AgM9216


AgM9216_Disable Function

[image]

AgM9216 IVI Driver Reference Agilent Technologies
AgM9216_Disable Function
Utility See Also

--NOT SUPPORTED-- Quickly places the instrument in a state where it has no, or minimal, effect on the external system to which it is connected. This state is not necessarily a known state.

Function Tree Node: \AgM9216\Utility\Disable
Declaration: AgM9216.h
Implementation: AgM9216.dll

Syntax

Visual C++
ViStatus AgM9216_Disable(
    ViSession Vi
);

Parameters

Vi

The ViSession handle that you obtain from the IviDriver_init or IviDriver_InitWithOptions function. The handle identifies a particular instrument session.

Return Value

Success or failure code.

See Also

Reference

Utility
AgM9216


AgM9216_error_message Function

[image]

AgM9216 IVI Driver Reference Agilent Technologies
AgM9216_error_message Function
Utility See Also

Translates the error return value from an IVI driver function to a user-readable string. The user should pass a buffer with at least 256 bytes for the ErrorMessage parameter.

Function Tree Node: \AgM9216\Utility\Error Message
Declaration: AgM9216.h
Implementation: AgM9216.dll

Syntax

Visual C++
ViStatus AgM9216_error_message(
    ViSession Vi,
    ViStatus ErrorCode,
    ViChar[] ErrorMessage
);

Parameters

Vi

The ViSession handle that you obtain from the IviDriver_init or IviDriver_InitWithOptions function. The handle identifies a particular instrument session.

ErrorCode

Instrument driver status code.

ErrorMessage

Instrument driver error message.

Return Value

Success or failure code.

See Also

Reference

Utility
AgM9216


AgM9216_error_query Function

[image]

AgM9216 IVI Driver Reference Agilent Technologies
AgM9216_error_query Function
Utility See Also

--NOT SUPPORTED-- Queries the instrument and returns instrument specific error information. This function can be used when QueryInstrumentStatus is True to retrieve error details when the driver detects an instrument error.

Function Tree Node: \AgM9216\Utility\Error Query
Declaration: AgM9216.h
Implementation: AgM9216.dll

Syntax

Visual C++
ViStatus AgM9216_error_query(
    ViSession Vi,
    ViInt32* ErrorCode,
    ViChar[] ErrorMessage
);

Parameters

Vi

The ViSession handle that you obtain from the IviDriver_init or IviDriver_InitWithOptions function. The handle identifies a particular instrument session.

ErrorCode

Instrument error code

ErrorMessage

Instrument error message

Return Value

Success or failure code.

See Also

Reference

Utility
AgM9216


AgM9216_GetError Function

[image]

AgM9216 IVI Driver Reference Agilent Technologies
AgM9216_GetError Function
Utility See Also

This function retrieves and then clears the IVI error information for the session or the current execution thread. If the user specifies a valid IVI session for the Vi parameter, Get Error retrieves and then clears the error information for the session. If the user passes VI_NULL for the Vi parameter, Get Error retrieves and then clears the error information for the current execution thread. If the Vi parameter is an invalid session, the function does nothing and returns an error. Normally, the error information describes the first error that occurred since the user last called the Get Error or Clear Error function.

Function Tree Node: \AgM9216\Utility\Get Error
Declaration: AgM9216.h
Implementation: AgM9216.dll

Syntax

Visual C++
ViStatus AgM9216_GetError(
    ViSession Vi,
    ViStatus* ErrorCode,
    ViInt32 ErrorDescriptionBufferSize,
    ViChar[] ErrorDescription
);

Parameters

Vi

The ViSession handle that you obtain from the IviDriver_init or IviDriver_InitWithOptions function. The handle identifies a particular instrument session.

ErrorCode

Returns the error code. Zero indicates that no error occurred. A positive value indicates a warning. A negative value indicates an error. The user can pass VI_NULL if the user does not want to retrieve this value.

ErrorDescriptionBufferSize

The number of bytes in the ViChar array that the user specifies for the ErrorDescription parameter.

ErrorDescription

Buffer into which the function copies the full formatted error string. The string describes the error code and any extra information regarding the error or warning condition. The buffer shall contain at least as many bytes as the user specifies in the ErrorDescriptionBufferSize parameter. The user can pass VI_NULL if the ErrorDescriptionBufferSize parameter is zero.

Return Value

Success or failure code.

See Also

Reference

Utility
AgM9216


AgM9216_GetNextCoercionRecord Function

[image]

AgM9216 IVI Driver Reference Agilent Technologies
AgM9216_GetNextCoercionRecord Function
Utility See Also

Returns the oldest record from the coercion record list. Records are only added to the list if RecordCoercions is True.

Function Tree Node: \AgM9216\Utility\Get Next Coercion Record
Declaration: AgM9216.h
Implementation: AgM9216.dll

Syntax

Visual C++
ViStatus AgM9216_GetNextCoercionRecord(
    ViSession Vi,
    ViInt32 CoercionRecordBufferSize,
    ViChar[] CoercionRecord
);

Parameters

Vi

The ViSession handle that you obtain from the IviDriver_init or IviDriver_InitWithOptions function. The handle identifies a particular instrument session.

CoercionRecordBufferSize

CoercionRecord

The coercion record string shall contain the following information: (1) The name of the attribute that was coerced. This can be the generic name, the COM property name, or the C defined constant. (2) If the attribute is channel-based, the name of the channel. The channel name can be the specific driver channel string or the virtual channel name that the user specified.(3) If the attribute applies to a repeated capability, the name of the repeated capability. The name can be the specific driver repeated capability token or the virtual repeated capability name that the user specified.(4) The value that the user specified for the attribute.(5) The value to which the attribute was coerced.

Return Value

Success or failure code.

See Also

Reference

Utility
AgM9216


AgM9216_GetNextInterchangeWarning Function

[image]

AgM9216 IVI Driver Reference Agilent Technologies
AgM9216_GetNextInterchangeWarning Function
Utility See Also

Returns the oldest warning from the interchange warning list. Records are only added to the list if InterchangeCheck is True.

Function Tree Node: \AgM9216\Utility\Get Next Interchange Warning
Declaration: AgM9216.h
Implementation: AgM9216.dll

Syntax

Visual C++
ViStatus AgM9216_GetNextInterchangeWarning(
    ViSession Vi,
    ViInt32 InterchangeWarningBufferSize,
    ViChar[] InterchangeWarning
);

Parameters

Vi

The ViSession handle that you obtain from the IviDriver_init or IviDriver_InitWithOptions function. The handle identifies a particular instrument session.

InterchangeWarningBufferSize

InterchangeWarning

A string describing the oldest interchangeability warning or empty string if no warrnings remain.

Return Value

Success or failure code.

See Also

Reference

Utility
AgM9216


AgM9216_InvalidateAllAttributes Function

[image]

AgM9216 IVI Driver Reference Agilent Technologies
AgM9216_InvalidateAllAttributes Function
Utility See Also

Invalidates all of the driver's cached values.

Function Tree Node: \AgM9216\Utility\Invalidate All Attributes
Declaration: AgM9216.h
Implementation: AgM9216.dll

Syntax

Visual C++
ViStatus AgM9216_InvalidateAllAttributes(
    ViSession Vi
);

Parameters

Vi

The ViSession handle that you obtain from the IviDriver_init or IviDriver_InitWithOptions function. The handle identifies a particular instrument session.

Return Value

Success or failure code.

See Also

Reference

Utility
AgM9216


AgM9216_LockSession Function

[image]

AgM9216 IVI Driver Reference Agilent Technologies
AgM9216_LockSession Function
Utility See Also

Obtains a multithread lock on the driver after waiting until all other execution threads have released their locks on the instrument session.

Function Tree Node: \AgM9216\Utility\Lock Session
Declaration: AgM9216.h
Implementation: AgM9216.dll

Syntax

Visual C++
ViStatus AgM9216_LockSession(
    ViSession Vi,
    ViBoolean* CallerHasLock
);

Parameters

Vi

The ViSession handle that you obtain from the IviDriver_init or IviDriver_InitWithOptions function. The handle identifies a particular instrument session.

CallerHasLock

Return Value

Success or failure code.

See Also

Reference

Utility
AgM9216


AgM9216_reset Function

[image]

AgM9216 IVI Driver Reference Agilent Technologies
AgM9216_reset Function
Utility See Also

Places the M9216 into a known state.

Function Tree Node: \AgM9216\Utility\Reset
Declaration: AgM9216.h
Implementation: AgM9216.dll

Syntax

Visual C++
ViStatus AgM9216_reset(
    ViSession Vi
);

Parameters

Vi

The ViSession handle that you obtain from the IviDriver_init or IviDriver_InitWithOptions function. The handle identifies a particular instrument session.

Return Value

Success or failure code.

Remarks

Min: 0

Default: 1000000 (1 s)

Max: 16000000 (16 s)

A zero setting will cause the channel to timeout immediately, and no measurement will be made on that channel. Note that when the M9216 is in AgM9216MeasurementModeMultiple mode , the longest TimeOut setting of all the eight channels will determine the maximum period WaitForAcquisitionToComplete waits before returning.

See Also

Reference

Utility
AgM9216


AgM9216_ResetInterchangeCheck Function

[image]

AgM9216 IVI Driver Reference Agilent Technologies
AgM9216_ResetInterchangeCheck Function
Utility See Also

Resets the interchangeability checking algorithms of the driver so that methods and properties that executed prior to calling this function have no affect on whether future calls to the driver generate interchangeability warnings.

Function Tree Node: \AgM9216\Utility\Reset Interchange Check
Declaration: AgM9216.h
Implementation: AgM9216.dll

Syntax

Visual C++
ViStatus AgM9216_ResetInterchangeCheck(
    ViSession Vi
);

Parameters

Vi

The ViSession handle that you obtain from the IviDriver_init or IviDriver_InitWithOptions function. The handle identifies a particular instrument session.

Return Value

Success or failure code.

See Also

Reference

Utility
AgM9216


AgM9216_ResetWithDefaults Function

[image]

AgM9216 IVI Driver Reference Agilent Technologies
AgM9216_ResetWithDefaults Function
Utility See Also

This function resets the M9216. All ports and properties will be set to the default values. A UpDateHardware command will be sent. This method needs to be called once when the M9216A is first started up.

Function Tree Node: \AgM9216\Utility\Reset With Defaults
Declaration: AgM9216.h
Implementation: AgM9216.dll

Syntax

Visual C++
ViStatus AgM9216_ResetWithDefaults(
    ViSession Vi
);

Parameters

Vi

The ViSession handle that you obtain from the IviDriver_init or IviDriver_InitWithOptions function. The handle identifies a particular instrument session.

Return Value

Success or failure code.

See Also

Reference

Utility
AgM9216


AgM9216_revision_query Function

[image]

AgM9216 IVI Driver Reference Agilent Technologies
AgM9216_revision_query Function
Utility See Also

Retrieves revision information from the instrument.

Function Tree Node: \AgM9216\Utility\Revision Query
Declaration: AgM9216.h
Implementation: AgM9216.dll

Syntax

Visual C++
ViStatus AgM9216_revision_query(
    ViSession Vi,
    ViChar[] DriverRev,
    ViChar[] InstrRev
);

Parameters

Vi

The ViSession handle that you obtain from the IviDriver_init or IviDriver_InitWithOptions function. The handle identifies a particular instrument session.

DriverRev

Returns the revision of the IVI specific driver, which is the value held in the Specific Driver Revision attribute. Refer to the Specific Driver Revision attribute for more information.

InstrRev

Returns the firmware revision of the instrument, which is the value held in the Instrument Firmware Revision attribute. Refer to the Instrument Firmware Revision attribute for more information.

Return Value

Success or failure code.

See Also

Reference

Utility
AgM9216


AgM9216_self_test Function

[image]

AgM9216 IVI Driver Reference Agilent Technologies
AgM9216_self_test Function
Utility See Also

--NOT SUPPORTED-- Performs an instrument self test, waits for the instrument to complete the test, and queries the instrument for the results. If the instrument passes the test, TestResult is zero and TestMessage is 'Self test passed'.

Function Tree Node: \AgM9216\Utility\Self Test
Declaration: AgM9216.h
Implementation: AgM9216.dll

Syntax

Visual C++
ViStatus AgM9216_self_test(
    ViSession Vi,
    ViInt16* TestResult,
    ViChar[] TestMessage
);

Parameters

Vi

The ViSession handle that you obtain from the IviDriver_init or IviDriver_InitWithOptions function. The handle identifies a particular instrument session.

TestResult

The numeric result from the self test operation. 0 = no error (test passed)

TestMessage

The self test status message

Return Value

Success or failure code.

See Also

Reference

Utility
AgM9216


AgM9216_UnlockSession Function

[image]

AgM9216 IVI Driver Reference Agilent Technologies
AgM9216_UnlockSession Function
Utility See Also

Releases a previously obtained mutlithread lock.

Function Tree Node: \AgM9216\Utility\Unlock Session
Declaration: AgM9216.h
Implementation: AgM9216.dll

Syntax

Visual C++
ViStatus AgM9216_UnlockSession(
    ViSession Vi,
    ViBoolean* CallerHasLock
);

Parameters

Vi

The ViSession handle that you obtain from the IviDriver_init or IviDriver_InitWithOptions function. The handle identifies a particular instrument session.

CallerHasLock

Return Value

Success or failure code.

See Also

Reference

Utility
AgM9216


Functions and Attributes

[image]

AgM9216 IVI Driver Reference Agilent Technologies
Functions and Attributes

Functions

 | Name | Description
Function | AgM9216_AcquisitionGetStatus | This function can be used to check the acquisition status of the digitizer's channel. The status can any of the following as shown in remark section below.
Function | AgM9216_AcquisitionInitiate | This function causes the M9216 to start acquiring waveform on all channels. In AgM9216TriggerModeImmediate mode, all channels will start waveform acquisiton. In AgM9216TriggerModeChannel mode, each channel will wait for a valid trigger from its source signal before acquiring data..
Function | AgM9216_AcquisitionWaitForAcquisitionComplete | Waits until the initiated acquisition is complete. Acquisition is complete when all channel(s) have successfully acquired the waveform or timed out waiting for a valid trigger. If no acquisition is currently running, this function returns immediately.
Function | AgM9216_ChannelConfigure | This function allows the user to configure any of the input ports that belongs to this channel. InputPort does not have to be the currently selected port. The M9216A allows each input port to have a unique configuration. When the user selects an input port for acquistion, using the InputPort (or InputConnectorSelection) property, the digitizer channel will automatically be configured with the port's configuration.Note that if the InputPort does not belong to the channel , an error code will be returned.
Function | AgM9216_ClearError | This function clears the error code and error description for the current execution thread and for the IVI session. If the user specifies a valid IVI session for the Vi parameter, this function clears the error information for the session. If the user passes VI_NULL for the Vi parameter, this function clears the error information for the current execution thread. If the Vi parameter is an invalid session, the function does nothing and returns an error.
Function | AgM9216_ClearInterchangeWarnings | Clears the list of interchangeability warnings that the IVI specific driver maintains.
Function | AgM9216_close | Closes the I/O session to the instrument. Driver methods and properties that access the instrument are not accessible after Close is called.
Function | AgM9216_Disable | --NOT SUPPORTED-- Quickly places the instrument in a state where it has no, or minimal, effect on the external system to which it is connected. This state is not necessarily a known state.
Function | AgM9216_error_message | Translates the error return value from an IVI driver function to a user-readable string. The user should pass a buffer with at least 256 bytes for the ErrorMessage parameter.
Function | AgM9216_error_query | --NOT SUPPORTED-- Queries the instrument and returns instrument specific error information. This function can be used when QueryInstrumentStatus is True to retrieve error details when the driver detects an instrument error.
Function | AgM9216_GetAttributeViBoolean | This routine is used to access low-level settings of the instrument. See the attributeID parameter for a link to all attributes of the instrument.
Function | AgM9216_GetAttributeViInt32 | This routine is used to access low-level settings of the instrument. See the attributeID parameter for a link to all attributes of the instrument.
Function | AgM9216_GetAttributeViReal64 | This routine is used to access low-level settings of the instrument. See the attributeID parameter for a link to all attributes of the instrument.
Function | AgM9216_GetAttributeViSession | This routine is used to access low-level settings of the instrument. See the attributeID parameter for a link to all attributes of the instrument.
Function | AgM9216_GetAttributeViString | This routine is used to access low-level settings of the instrument. See the attributeID parameter for a link to all attributes of the instrument.
Function | AgM9216_GetChannelName | Returns the channel name that corresponds to the one-based index that the user specifies.
Function | AgM9216_GetError | This function retrieves and then clears the IVI error information for the session or the current execution thread. If the user specifies a valid IVI session for the Vi parameter, Get Error retrieves and then clears the error information for the session. If the user passes VI_NULL for the Vi parameter, Get Error retrieves and then clears the error information for the current execution thread. If the Vi parameter is an invalid session, the function does nothing and returns an error. Normally, the error information describes the first error that occurred since the user last called the Get Error or Clear Error function.
Function | AgM9216_GetNextCoercionRecord | Returns the oldest record from the coercion record list. Records are only added to the list if RecordCoercions is True.
Function | AgM9216_GetNextInterchangeWarning | Returns the oldest warning from the interchange warning list. Records are only added to the list if InterchangeCheck is True.
Function | AgM9216_init | Opens the I/O session to the instrument. Driver methods and properties that access the instrument are only accessible after Initialize is called. Initialize optionally performs a Reset and queries the instrument to validate the instrument model.
Function | AgM9216_InitWithOptions | Opens the I/O session to the instrument. Driver methods and properties that access the instrument are only accessible after Initialize is called. Initialize optionally performs a Reset and queries the instrument to validate the instrument model.
Function | AgM9216_InvalidateAllAttributes | Invalidates all of the driver's cached values.
Function | AgM9216_LockSession | Obtains a multithread lock on the driver after waiting until all other execution threads have released their locks on the instrument session.
Function | AgM9216_MeasurementFetchWaveformInt32 | When an acquisition for a channel has been completed successfully, acquisition data will be sent from the channel to the controller's driver memory. The user can use this function to copy the data into the user's buffer.
Function | AgM9216_MeasurementFetchWaveformReal64 | When an acquisition has been completed successfully, data will be prefetched from the hardware to the controller's driver memory. The user uses this function to calculate the actual voltage of the waveform and copy the result into user?s buffer. The voltage is calculated with the stored calibration coefficient.Note that when an acquisition is not successful, no data will be prefetched to the driver. The user can also choose not to prefetch any data by using the RangeSelect property.
Function | AgM9216_reset | Places the M9216 into a known state.
Function | AgM9216_ResetInterchangeCheck | Resets the interchangeability checking algorithms of the driver so that methods and properties that executed prior to calling this function have no affect on whether future calls to the driver generate interchangeability warnings.
Function | AgM9216_ResetWithDefaults | This function resets the M9216. All ports and properties will be set to the default values. A UpDateHardware command will be sent. This method needs to be called once when the M9216A is first started up.
Function | AgM9216_revision_query | Retrieves revision information from the instrument.
Function | AgM9216_self_test | --NOT SUPPORTED-- Performs an instrument self test, waits for the instrument to complete the test, and queries the instrument for the results. If the instrument passes the test, TestResult is zero and TestMessage is 'Self test passed'.
Function | AgM9216_SetAttributeViBoolean | This routine is used to access low-level settings of the instrument. See the attributeID parameter for a link to all attributes of the instrument.
Function | AgM9216_SetAttributeViInt32 | This routine is used to access low-level settings of the instrument. See the attributeID parameter for a link to all attributes of the instrument.
Function | AgM9216_SetAttributeViReal64 | This routine is used to access low-level settings of the instrument. See the attributeID parameter for a link to all attributes of the instrument.
Function | AgM9216_SetAttributeViSession | This routine is used to access low-level settings of the instrument. See the attributeID parameter for a link to all attributes of the instrument.
Function | AgM9216_SetAttributeViString | This routine is used to access low-level settings of the instrument. See the attributeID parameter for a link to all attributes of the instrument.
Function | AgM9216_SetChannelInputConnectorSelection | Set the Input connector of a channel (Digitizer).
Function | AgM9216_SetChannelInputPort | Sets the active (physically switch) port number belonging to the channel (digitizer). Return value is integer of 1 to 32.
Function | AgM9216_SetChannelRecordSize | Sets the acquisition recordSize of the Input connector of the channel (digitizer).
Function | AgM9216_SetMeasurementMode | Sets the Measurement mode (Single channel) or (Multiple Channel).
Function | AgM9216_SetTriggerDelay | Sets the trigger hold off time.
Function | AgM9216_SetTriggerHoldOffCount | Sets the count of valid edges that are detected before triggering is achieved. Maximum allowable is 255
Function | AgM9216_SetTriggerHysteresis | Sets the trigger level hysteresis in voltage for the currently selected connector
Function | AgM9216_SetTriggerLevel | Sets the trigger level in voltage for the current selected connector.
Function | AgM9216_SetTriggerMode | Sets the M9216A in immediate or trigger(Channel) mode.
Function | AgM9216_SetTriggerPreTriggerSamples | Specifies the number of samples that must be collected before a trigger event will be recognized. This value must not exceed the RecordSize of the waveform.This setting is ignored if TriggerMode is AgM9216TriggerModeImmediate.
Function | AgM9216_SetTriggerSlope | Sets the edge type for the trigger. [Positive, Negative, Both or Level slope]
Function | AgM9216_SetTriggerTimeOut | Sets the maximum time allowable to achieve trigger. The resolution is 1 us
Function | AgM9216_UnlockSession | Releases a previously obtained mutlithread lock.
Function | AgM9216_UpdateHardware | Loads the digitizer configuration and connector selection into the hardware. All changes to configuration settings and connector selection are cached in the host driver until this command is called. This command effectively synchronizes the host driver and hardware.
Top

Attributes

 | Name | Description
Attribute | AGM9216_ATTR_CACHE | Drivers may choose to always cache some instrument settings, never cache others, and optionally cache others, to avoid unecessary I/O to the instrument. If True, the driver caches optionally cached instrument settings.
Attribute | AGM9216_ATTR_CHANNEL_AUX_OUT_ENABLED | Set this property to true to switch the currently selected input port to instead become an auxiliary output port of the digitizer. A true setting is not allowed in AgM9216MeasurementModeSingle mode. Users are not allowed to switch to Auxiliary ports in this mode.
Attribute | AGM9216_ATTR_CHANNEL_BANKID | -- READ ONLY -- In multichannel mode this property returns the bank number of the specified digitizer(channel). In Single Channel mode, there is only one logical digitizer channel, the value returned is always 0. See the link further below for a table of information..
Attribute | AGM9216_ATTR_CHANNEL_COUNT |
Attribute | AGM9216_ATTR_CHANNEL_INPUT_CONNECTOR_SELECTION | Select the logical input connector to for each channel. In AgM9216MeasurementModeMultiple mode, there are four input connectors for each channel while in AgM9216MeasurementModeSingle mode, the Input Port selection must be used to specify which physical connection will supply the signal to be measured.The input will be either connected to the specified digitizer (channel) or the auxiliary output port, depending upon the AuxOutEnabled setting.
Attribute | AGM9216_ATTR_CHANNEL_INPUT_PORT | Select the input port for the channel. Note that the multiplexer relays in the hardware will only be activated after the UpdateHardware command is sent.The input port will be either connected to the specified digitizer (channel) or auxiliary out port, depending on the AuxOutEnabled property setting.
Attribute | AGM9216_ATTR_CHANNEL_RECORD_SIZE | Sets or reads the number of samples to acquire for the waveform. This property applies for the currently selected port. To set the record length for a port that is not currently selected, use the Configure function.
Attribute | AGM9216_ATTR_DRIVER_SETUP | The driver setup string. It is either specified in the Configuration Store or passed in the OptionString parameter of the Initialize function. Driver setup is empty if the driver is not initialized.
Attribute | AGM9216_ATTR_GROUP_CAPABILITIES | A comma-separated list of the class capability groups implemented by the driver. Capability group names are documented in the IVI class specifications. If the driver is not class compliant, the driver returns an empty string.
Attribute | AGM9216_ATTR_INSTRUMENT_FIRMWARE_REVISION | The firmware revision reported by the physical instrument. If Simulation is enabled or the instrument is not capable of reporting the firmware revision, a string is returned that explains the condition.
Attribute | AGM9216_ATTR_INSTRUMENT_MANUFACTURER | The name of the manufacturer reported by the physical instrument. If Simulation is enabled or the instrument is not capable of reporting the name of the manufacturer, a string is returned that explains the condition. Manufacturer is limited to 256 bytes
Attribute | AGM9216_ATTR_INSTRUMENT_MODEL | The model number or name reported by the physical instrument. If Simulation is enabled or the instrument is not capable of reporting the model number or name, a string is returned that explains the condition. Model is limited to 256 bytes
Attribute | AGM9216_ATTR_INTERCHANGE_CHECK | If True, the driver maintains a record of interchangeability warnings. If the driver does not support interchangeability checking, attempts to set InterchangeCheck to True return an error.
Attribute | AGM9216_ATTR_IO_RESOURCE_DESCRIPTOR | The resource descriptor specifies the connection to a physical device. It is either specified in the Configuration Store or passed in the ResourceName parameter of the Initialize function. It is empty if the driver is not initialized.
Attribute | AGM9216_ATTR_LOGICAL_NAME | Logical Name identifies a driver session in the Configuration Store. If Logical Name is not empty, the driver was initialized from information in the driver session. If it is empty, the driver was initialized without using the Configuration Store.
Attribute | AGM9216_ATTR_MEASUREMENT_MODE | This property determines whether the M9216A is set in Single channel or Multiple Channel personality. When this property is changed, the device's configuration properties will be reinitialized to the default settings. InputConnector for all channels will be set to 1. An update hardware command will also be sent to the hardware.
Attribute | AGM9216_ATTR_MEASUREMENT_RANGE_SELECT | Selects which waveform data from the 5V and 100V sub channels of the digitizer will be fetched to the driver after completing acquisition.When the M9216 is reset, the default value is AgM9216DigitizerRangeSelectBoth.
Attribute | AGM9216_ATTR_QUERY_INSTRUMENT_STATUS | If True, the driver queries the instrument status at the end of each method or property that performs I/O to the instrument. If an error is reported, use ErrorQuery to retrieve error messages one at a time from the instrument.
Attribute | AGM9216_ATTR_RANGE_CHECK | Drivers may choose to always validate some property/parameter values, never validate others, and optionally validate others, to avoid sending invalid commands to the instrument. If True, the driver performs optional validations.
Attribute | AGM9216_ATTR_RECORD_COERCIONS | If True, the driver keeps a list of the value coercions it makes for ViInt32 and ViReal64 attributes. If the driver does not support coercion recording, attempts to set RecordCoercions to True will return an error.
Attribute | AGM9216_ATTR_SIMULATE | If True, the driver does not perform I/O to the instrument, and returns simulated values for output parameters.
Attribute | AGM9216_ATTR_SPECIFIC_DRIVER_CLASS_SPEC_MAJOR_VERSION | Returns the major version number of the class specification in accordance with which the IVI specific driver was developed. Zero is returned if the driver is not compliant with a class specification.
Attribute | AGM9216_ATTR_SPECIFIC_DRIVER_CLASS_SPEC_MINOR_VERSION | Returns the minor version number of the class specification in accordance with which the IVI specific driver was developed. Zero is returned if the driver is not compliant with a class specification.
Attribute | AGM9216_ATTR_SPECIFIC_DRIVER_DESCRIPTION | Returns a brief description of the IVI specific driver. The string that this attribute returns contains a maximum of 256 bytes including the NUL byte.
Attribute | AGM9216_ATTR_SPECIFIC_DRIVER_PREFIX | Returns the case-sensitive prefix of the user-callable functions that the IVI-C specific driver exports. The string that this attribute returns contains a maximum of 32 bytes including the NUL byte.
Attribute | AGM9216_ATTR_SPECIFIC_DRIVER_REVISION | Returns version information about the IVI specific driver. The string that this attribute returns contains a maximum of 256 bytes including the NUL byte.
Attribute | AGM9216_ATTR_SPECIFIC_DRIVER_VENDOR | Returns the name of the vendor that supplies the IVI specific driver. The string that this attribute returns contains a maximum of 256 bytes including the NUL byte.
Attribute | AGM9216_ATTR_SUPPORTED_INSTRUMENT_MODELS | A comma-separated list of instrument models that the IVI specific driver can control. The string does not include an abbreviation for the manufacturer if it is the same for all models.
Attribute | AGM9216_ATTR_SYSTEM_BOARD_REVISION | -- READ ONLY -- Returns the PCB version.
Attribute | AGM9216_ATTR_SYSTEM_CALIBATION_DATE | -- READ ONLY -- Returns the Calibration Date from EEPROM.
Attribute | AGM9216_ATTR_SYSTEM_DRIVER_REVISION | -- READ ONLY -- Returns the fundamental driver revision.
Attribute | AGM9216_ATTR_SYSTEM_FPGA_REVISION | -- READ ONLY -- Returns the FPGA firmware version.
Attribute | AGM9216_ATTR_SYSTEM_SERIAL_NUMBER | -- READ ONLY -- Returns the serial number of the module.
Attribute | AGM9216_ATTR_SYSTEM_SLOT_NUMBER | -- READ ONLY -- Returns the the slot number of the card.
Attribute | AGM9216_ATTR_SYSTEM_TRACE_ENABLED | If true, outputs a trace log of all driver calls to an xml file in the same directory as the application executable accessing the driver. Generates default unique file names based on date and time. A new file is generated each time tracing is enabled.
Attribute | AGM9216_ATTR_TRIGGER_DELAY | Specifies the length of time from the valid trigger event to the first point in the waveform record. The units are in microseconds. See example code in Remarks section. Note that this setting is ignored if TriggerMode is AgM9216TriggerModeImmediate.
Attribute | AGM9216_ATTR_TRIGGER_HOLD_OFF_COUNT | Specifies the number of valid edges to detect before waveform recording can occur.Note that this setting is ignored if TriggerMode is AgM9216TriggerModeImmediate
Attribute | AGM9216_ATTR_TRIGGER_HYSTERESIS | Specifies the trigger hysteresis in Volts. Note that this setting is ignored if TriggerMode is AgM9216TriggerModeImmediate.
Attribute | AGM9216_ATTR_TRIGGER_LEVEL | Specifies the voltage threshold for the trigger sub-system. The units are Volts.Note that this setting is ignored if TriggerMode is AgM9216TriggerModeImmediate.
Attribute | AGM9216_ATTR_TRIGGER_MODE | This property sets whether the M9216A channels uses the trigger level settings to perform the measurement, or to instead acquire data immediately upon receiving the Initiate command.
Attribute | AGM9216_ATTR_TRIGGER_PRE_TRIGGER_SAMPLES | Specifies the number of samples that must be collected before a trigger event will be recognized. This value must not exceed the RecordSize of the waveform.This setting is ignored if TriggerMode is AgM9216TriggerModeImmediate.
Attribute | AGM9216_ATTR_TRIGGER_SLOPE | Specifies trigger slope for the input port as either rising edge, falling edge ,both edges or DC level.Valid values are AgM9216TriggerSlopePositive , AgM9216TriggerSlopeNegative and AgM9216TriggerSlopeBoth, AgM9216TriggerSlopeLevel .This setting is ignored if TriggerMode is AgM9216TriggerModeImmediate.
Attribute | AGM9216_ATTR_TRIGGER_TIME_OUT | Specifies the maximum allowable time for the channel to detect a valid trigger condition as specified by the configuration parameters. If the trigger condition is not met, a AgM9216AcquisitionStatusTimeOut is returned as acquisition status.The units are set in multiples of one microsecond.This setting is ignored if TriggerMode is AgM9216TriggerModeImmediate.
Top


Functions and Attributes

[image]

AgM9216 IVI Driver Reference Agilent Technologies
Functions

Functions

 | Name | Description
Function | AgM9216_AcquisitionGetStatus | This function can be used to check the acquisition status of the digitizer's channel. The status can any of the following as shown in remark section below.
Function | AgM9216_AcquisitionInitiate | This function causes the M9216 to start acquiring waveform on all channels. In AgM9216TriggerModeImmediate mode, all channels will start waveform acquisiton. In AgM9216TriggerModeChannel mode, each channel will wait for a valid trigger from its source signal before acquiring data..
Function | AgM9216_AcquisitionWaitForAcquisitionComplete | Waits until the initiated acquisition is complete. Acquisition is complete when all channel(s) have successfully acquired the waveform or timed out waiting for a valid trigger. If no acquisition is currently running, this function returns immediately.
Function | AgM9216_ChannelConfigure | This function allows the user to configure any of the input ports that belongs to this channel. InputPort does not have to be the currently selected port. The M9216A allows each input port to have a unique configuration. When the user selects an input port for acquistion, using the InputPort (or InputConnectorSelection) property, the digitizer channel will automatically be configured with the port's configuration.Note that if the InputPort does not belong to the channel , an error code will be returned.
Function | AgM9216_ClearError | This function clears the error code and error description for the current execution thread and for the IVI session. If the user specifies a valid IVI session for the Vi parameter, this function clears the error information for the session. If the user passes VI_NULL for the Vi parameter, this function clears the error information for the current execution thread. If the Vi parameter is an invalid session, the function does nothing and returns an error.
Function | AgM9216_ClearInterchangeWarnings | Clears the list of interchangeability warnings that the IVI specific driver maintains.
Function | AgM9216_close | Closes the I/O session to the instrument. Driver methods and properties that access the instrument are not accessible after Close is called.
Function | AgM9216_Disable | --NOT SUPPORTED-- Quickly places the instrument in a state where it has no, or minimal, effect on the external system to which it is connected. This state is not necessarily a known state.
Function | AgM9216_error_message | Translates the error return value from an IVI driver function to a user-readable string. The user should pass a buffer with at least 256 bytes for the ErrorMessage parameter.
Function | AgM9216_error_query | --NOT SUPPORTED-- Queries the instrument and returns instrument specific error information. This function can be used when QueryInstrumentStatus is True to retrieve error details when the driver detects an instrument error.
Function | AgM9216_GetAttributeViBoolean | This routine is used to access low-level settings of the instrument. See the attributeID parameter for a link to all attributes of the instrument.
Function | AgM9216_GetAttributeViInt32 | This routine is used to access low-level settings of the instrument. See the attributeID parameter for a link to all attributes of the instrument.
Function | AgM9216_GetAttributeViReal64 | This routine is used to access low-level settings of the instrument. See the attributeID parameter for a link to all attributes of the instrument.
Function | AgM9216_GetAttributeViSession | This routine is used to access low-level settings of the instrument. See the attributeID parameter for a link to all attributes of the instrument.
Function | AgM9216_GetAttributeViString | This routine is used to access low-level settings of the instrument. See the attributeID parameter for a link to all attributes of the instrument.
Function | AgM9216_GetChannelName | Returns the channel name that corresponds to the one-based index that the user specifies.
Function | AgM9216_GetError | This function retrieves and then clears the IVI error information for the session or the current execution thread. If the user specifies a valid IVI session for the Vi parameter, Get Error retrieves and then clears the error information for the session. If the user passes VI_NULL for the Vi parameter, Get Error retrieves and then clears the error information for the current execution thread. If the Vi parameter is an invalid session, the function does nothing and returns an error. Normally, the error information describes the first error that occurred since the user last called the Get Error or Clear Error function.
Function | AgM9216_GetNextCoercionRecord | Returns the oldest record from the coercion record list. Records are only added to the list if RecordCoercions is True.
Function | AgM9216_GetNextInterchangeWarning | Returns the oldest warning from the interchange warning list. Records are only added to the list if InterchangeCheck is True.
Function | AgM9216_init | Opens the I/O session to the instrument. Driver methods and properties that access the instrument are only accessible after Initialize is called. Initialize optionally performs a Reset and queries the instrument to validate the instrument model.
Function | AgM9216_InitWithOptions | Opens the I/O session to the instrument. Driver methods and properties that access the instrument are only accessible after Initialize is called. Initialize optionally performs a Reset and queries the instrument to validate the instrument model.
Function | AgM9216_InvalidateAllAttributes | Invalidates all of the driver's cached values.
Function | AgM9216_LockSession | Obtains a multithread lock on the driver after waiting until all other execution threads have released their locks on the instrument session.
Function | AgM9216_MeasurementFetchWaveformInt32 | When an acquisition for a channel has been completed successfully, acquisition data will be sent from the channel to the controller's driver memory. The user can use this function to copy the data into the user's buffer.
Function | AgM9216_MeasurementFetchWaveformReal64 | When an acquisition has been completed successfully, data will be prefetched from the hardware to the controller's driver memory. The user uses this function to calculate the actual voltage of the waveform and copy the result into user?s buffer. The voltage is calculated with the stored calibration coefficient.Note that when an acquisition is not successful, no data will be prefetched to the driver. The user can also choose not to prefetch any data by using the RangeSelect property.
Function | AgM9216_reset | Places the M9216 into a known state.
Function | AgM9216_ResetInterchangeCheck | Resets the interchangeability checking algorithms of the driver so that methods and properties that executed prior to calling this function have no affect on whether future calls to the driver generate interchangeability warnings.
Function | AgM9216_ResetWithDefaults | This function resets the M9216. All ports and properties will be set to the default values. A UpDateHardware command will be sent. This method needs to be called once when the M9216A is first started up.
Function | AgM9216_revision_query | Retrieves revision information from the instrument.
Function | AgM9216_self_test | --NOT SUPPORTED-- Performs an instrument self test, waits for the instrument to complete the test, and queries the instrument for the results. If the instrument passes the test, TestResult is zero and TestMessage is 'Self test passed'.
Function | AgM9216_SetAttributeViBoolean | This routine is used to access low-level settings of the instrument. See the attributeID parameter for a link to all attributes of the instrument.
Function | AgM9216_SetAttributeViInt32 | This routine is used to access low-level settings of the instrument. See the attributeID parameter for a link to all attributes of the instrument.
Function | AgM9216_SetAttributeViReal64 | This routine is used to access low-level settings of the instrument. See the attributeID parameter for a link to all attributes of the instrument.
Function | AgM9216_SetAttributeViSession | This routine is used to access low-level settings of the instrument. See the attributeID parameter for a link to all attributes of the instrument.
Function | AgM9216_SetAttributeViString | This routine is used to access low-level settings of the instrument. See the attributeID parameter for a link to all attributes of the instrument.
Function | AgM9216_SetChannelInputConnectorSelection | Set the Input connector of a channel (Digitizer).
Function | AgM9216_SetChannelInputPort | Sets the active (physically switch) port number belonging to the channel (digitizer). Return value is integer of 1 to 32.
Function | AgM9216_SetChannelRecordSize | Sets the acquisition recordSize of the Input connector of the channel (digitizer).
Function | AgM9216_SetMeasurementMode | Sets the Measurement mode (Single channel) or (Multiple Channel).
Function | AgM9216_SetTriggerDelay | Sets the trigger hold off time.
Function | AgM9216_SetTriggerHoldOffCount | Sets the count of valid edges that are detected before triggering is achieved. Maximum allowable is 255
Function | AgM9216_SetTriggerHysteresis | Sets the trigger level hysteresis in voltage for the currently selected connector
Function | AgM9216_SetTriggerLevel | Sets the trigger level in voltage for the current selected connector.
Function | AgM9216_SetTriggerMode | Sets the M9216A in immediate or trigger(Channel) mode.
Function | AgM9216_SetTriggerPreTriggerSamples | Specifies the number of samples that must be collected before a trigger event will be recognized. This value must not exceed the RecordSize of the waveform.This setting is ignored if TriggerMode is AgM9216TriggerModeImmediate.
Function | AgM9216_SetTriggerSlope | Sets the edge type for the trigger. [Positive, Negative, Both or Level slope]
Function | AgM9216_SetTriggerTimeOut | Sets the maximum time allowable to achieve trigger. The resolution is 1 us
Function | AgM9216_UnlockSession | Releases a previously obtained mutlithread lock.
Function | AgM9216_UpdateHardware | Loads the digitizer configuration and connector selection into the hardware. All changes to configuration settings and connector selection are cached in the host driver until this command is called. This command effectively synchronizes the host driver and hardware.
Top


Attributes

Attributes

 | Name | Description
Attribute | AGM9216_ATTR_CACHE | Drivers may choose to always cache some instrument settings, never cache others, and optionally cache others, to avoid unecessary I/O to the instrument. If True, the driver caches optionally cached instrument settings.
Attribute | AGM9216_ATTR_CHANNEL_AUX_OUT_ENABLED | Set this property to true to switch the currently selected input port to instead become an auxiliary output port of the digitizer. A true setting is not allowed in AgM9216MeasurementModeSingle mode. Users are not allowed to switch to Auxiliary ports in this mode.
Attribute | AGM9216_ATTR_CHANNEL_BANKID | -- READ ONLY -- In multichannel mode this property returns the bank number of the specified digitizer(channel). In Single Channel mode, there is only one logical digitizer channel, the value returned is always 0. See the link further below for a table of information..
Attribute | AGM9216_ATTR_CHANNEL_COUNT |
Attribute | AGM9216_ATTR_CHANNEL_INPUT_CONNECTOR_SELECTION | Select the logical input connector to for each channel. In AgM9216MeasurementModeMultiple mode, there are four input connectors for each channel while in AgM9216MeasurementModeSingle mode, the Input Port selection must be used to specify which physical connection will supply the signal to be measured.The input will be either connected to the specified digitizer (channel) or the auxiliary output port, depending upon the AuxOutEnabled setting.
Attribute | AGM9216_ATTR_CHANNEL_INPUT_PORT | Select the input port for the channel. Note that the multiplexer relays in the hardware will only be activated after the UpdateHardware command is sent.The input port will be either connected to the specified digitizer (channel) or auxiliary out port, depending on the AuxOutEnabled property setting.
Attribute | AGM9216_ATTR_CHANNEL_RECORD_SIZE | Sets or reads the number of samples to acquire for the waveform. This property applies for the currently selected port. To set the record length for a port that is not currently selected, use the Configure function.
Attribute | AGM9216_ATTR_DRIVER_SETUP | The driver setup string. It is either specified in the Configuration Store or passed in the OptionString parameter of the Initialize function. Driver setup is empty if the driver is not initialized.
Attribute | AGM9216_ATTR_GROUP_CAPABILITIES | A comma-separated list of the class capability groups implemented by the driver. Capability group names are documented in the IVI class specifications. If the driver is not class compliant, the driver returns an empty string.
Attribute | AGM9216_ATTR_INSTRUMENT_FIRMWARE_REVISION | The firmware revision reported by the physical instrument. If Simulation is enabled or the instrument is not capable of reporting the firmware revision, a string is returned that explains the condition.
Attribute | AGM9216_ATTR_INSTRUMENT_MANUFACTURER | The name of the manufacturer reported by the physical instrument. If Simulation is enabled or the instrument is not capable of reporting the name of the manufacturer, a string is returned that explains the condition. Manufacturer is limited to 256 bytes
Attribute | AGM9216_ATTR_INSTRUMENT_MODEL | The model number or name reported by the physical instrument. If Simulation is enabled or the instrument is not capable of reporting the model number or name, a string is returned that explains the condition. Model is limited to 256 bytes
Attribute | AGM9216_ATTR_INTERCHANGE_CHECK | If True, the driver maintains a record of interchangeability warnings. If the driver does not support interchangeability checking, attempts to set InterchangeCheck to True return an error.
Attribute | AGM9216_ATTR_IO_RESOURCE_DESCRIPTOR | The resource descriptor specifies the connection to a physical device. It is either specified in the Configuration Store or passed in the ResourceName parameter of the Initialize function. It is empty if the driver is not initialized.
Attribute | AGM9216_ATTR_LOGICAL_NAME | Logical Name identifies a driver session in the Configuration Store. If Logical Name is not empty, the driver was initialized from information in the driver session. If it is empty, the driver was initialized without using the Configuration Store.
Attribute | AGM9216_ATTR_MEASUREMENT_MODE | This property determines whether the M9216A is set in Single channel or Multiple Channel personality. When this property is changed, the device's configuration properties will be reinitialized to the default settings. InputConnector for all channels will be set to 1. An update hardware command will also be sent to the hardware.
Attribute | AGM9216_ATTR_MEASUREMENT_RANGE_SELECT | Selects which waveform data from the 5V and 100V sub channels of the digitizer will be fetched to the driver after completing acquisition.When the M9216 is reset, the default value is AgM9216DigitizerRangeSelectBoth.
Attribute | AGM9216_ATTR_QUERY_INSTRUMENT_STATUS | If True, the driver queries the instrument status at the end of each method or property that performs I/O to the instrument. If an error is reported, use ErrorQuery to retrieve error messages one at a time from the instrument.
Attribute | AGM9216_ATTR_RANGE_CHECK | Drivers may choose to always validate some property/parameter values, never validate others, and optionally validate others, to avoid sending invalid commands to the instrument. If True, the driver performs optional validations.
Attribute | AGM9216_ATTR_RECORD_COERCIONS | If True, the driver keeps a list of the value coercions it makes for ViInt32 and ViReal64 attributes. If the driver does not support coercion recording, attempts to set RecordCoercions to True will return an error.
Attribute | AGM9216_ATTR_SIMULATE | If True, the driver does not perform I/O to the instrument, and returns simulated values for output parameters.
Attribute | AGM9216_ATTR_SPECIFIC_DRIVER_CLASS_SPEC_MAJOR_VERSION | Returns the major version number of the class specification in accordance with which the IVI specific driver was developed. Zero is returned if the driver is not compliant with a class specification.
Attribute | AGM9216_ATTR_SPECIFIC_DRIVER_CLASS_SPEC_MINOR_VERSION | Returns the minor version number of the class specification in accordance with which the IVI specific driver was developed. Zero is returned if the driver is not compliant with a class specification.
Attribute | AGM9216_ATTR_SPECIFIC_DRIVER_DESCRIPTION | Returns a brief description of the IVI specific driver. The string that this attribute returns contains a maximum of 256 bytes including the NUL byte.
Attribute | AGM9216_ATTR_SPECIFIC_DRIVER_PREFIX | Returns the case-sensitive prefix of the user-callable functions that the IVI-C specific driver exports. The string that this attribute returns contains a maximum of 32 bytes including the NUL byte.
Attribute | AGM9216_ATTR_SPECIFIC_DRIVER_REVISION | Returns version information about the IVI specific driver. The string that this attribute returns contains a maximum of 256 bytes including the NUL byte.
Attribute | AGM9216_ATTR_SPECIFIC_DRIVER_VENDOR | Returns the name of the vendor that supplies the IVI specific driver. The string that this attribute returns contains a maximum of 256 bytes including the NUL byte.
Attribute | AGM9216_ATTR_SUPPORTED_INSTRUMENT_MODELS | A comma-separated list of instrument models that the IVI specific driver can control. The string does not include an abbreviation for the manufacturer if it is the same for all models.
Attribute | AGM9216_ATTR_SYSTEM_BOARD_REVISION | -- READ ONLY -- Returns the PCB version.
Attribute | AGM9216_ATTR_SYSTEM_CALIBATION_DATE | -- READ ONLY -- Returns the Calibration Date from EEPROM.
Attribute | AGM9216_ATTR_SYSTEM_DRIVER_REVISION | -- READ ONLY -- Returns the fundamental driver revision.
Attribute | AGM9216_ATTR_SYSTEM_FPGA_REVISION | -- READ ONLY -- Returns the FPGA firmware version.
Attribute | AGM9216_ATTR_SYSTEM_SERIAL_NUMBER | -- READ ONLY -- Returns the serial number of the module.
Attribute | AGM9216_ATTR_SYSTEM_SLOT_NUMBER | -- READ ONLY -- Returns the the slot number of the card.
Attribute | AGM9216_ATTR_SYSTEM_TRACE_ENABLED | If true, outputs a trace log of all driver calls to an xml file in the same directory as the application executable accessing the driver. Generates default unique file names based on date and time. A new file is generated each time tracing is enabled.
Attribute | AGM9216_ATTR_TRIGGER_DELAY | Specifies the length of time from the valid trigger event to the first point in the waveform record. The units are in microseconds. See example code in Remarks section. Note that this setting is ignored if TriggerMode is AgM9216TriggerModeImmediate.
Attribute | AGM9216_ATTR_TRIGGER_HOLD_OFF_COUNT | Specifies the number of valid edges to detect before waveform recording can occur.Note that this setting is ignored if TriggerMode is AgM9216TriggerModeImmediate
Attribute | AGM9216_ATTR_TRIGGER_HYSTERESIS | Specifies the trigger hysteresis in Volts. Note that this setting is ignored if TriggerMode is AgM9216TriggerModeImmediate.
Attribute | AGM9216_ATTR_TRIGGER_LEVEL | Specifies the voltage threshold for the trigger sub-system. The units are Volts.Note that this setting is ignored if TriggerMode is AgM9216TriggerModeImmediate.
Attribute | AGM9216_ATTR_TRIGGER_MODE | This property sets whether the M9216A channels uses the trigger level settings to perform the measurement, or to instead acquire data immediately upon receiving the Initiate command.
Attribute | AGM9216_ATTR_TRIGGER_PRE_TRIGGER_SAMPLES | Specifies the number of samples that must be collected before a trigger event will be recognized. This value must not exceed the RecordSize of the waveform.This setting is ignored if TriggerMode is AgM9216TriggerModeImmediate.
Attribute | AGM9216_ATTR_TRIGGER_SLOPE | Specifies trigger slope for the input port as either rising edge, falling edge ,both edges or DC level.Valid values are AgM9216TriggerSlopePositive , AgM9216TriggerSlopeNegative and AgM9216TriggerSlopeBoth, AgM9216TriggerSlopeLevel .This setting is ignored if TriggerMode is AgM9216TriggerModeImmediate.
Attribute | AGM9216_ATTR_TRIGGER_TIME_OUT | Specifies the maximum allowable time for the channel to detect a valid trigger condition as specified by the configuration parameters. If the trigger condition is not met, a AgM9216AcquisitionStatusTimeOut is returned as acquisition status.The units are set in multiples of one microsecond.This setting is ignored if TriggerMode is AgM9216TriggerModeImmediate.
Top


Errors and Warnings

[image]

AgM9216 IVI Driver Reference Agilent Technologies
Errors and Warnings

Errors

Name | Value (Hex) | Value (Decimal) | Description
AGM9216_ERROR_CANNOT_RECOVER | 0xBFFA0000 | -1074135040 | Failure cannot recover.
AGM9216_ERROR_INSTRUMENT_STATUS | 0xBFFA0001 | -1074135039 | Instrument error detected. Use ErrorQuery() to determine the error(s).
AGM9216_ERROR_CANNOT_OPEN_FILE | 0xBFFA0002 | -1074135038 | Cannot open file.
AGM9216_ERROR_READING_FILE | 0xBFFA0003 | -1074135037 | Error reading file.
AGM9216_ERROR_WRITING_FILE | 0xBFFA0004 | -1074135036 | Error writing file.
AGM9216_ERROR_INVALID_PATHNAME | 0xBFFA000B | -1074135029 | The pathname is invalid.
AGM9216_ERROR_INVALID_VALUE | 0xBFFA0010 | -1074135024 | Invalid value (%1) for method %2, parameter %3.
AGM9216_ERROR_FUNCTION_NOT_SUPPORTED | 0xBFFA0011 | -1074135023 | Does not support this class-compliant feature: method %1
AGM9216_ERROR_ATTRIBUTE_NOT_SUPPORTED | 0xBFFA0012 | -1074135022 | Does not support this class-compliant feature: property %1.
AGM9216_ERROR_VALUE_NOT_SUPPORTED | 0xBFFA0013 | -1074135021 | Does not support this class-compliant feature: (enumeration) value %1 passed as the value for parameter %2 in method %3.
AGM9216_ERROR_NOT_INITIALIZED | 0xBFFA001D | -1074135011 | A connection to the instrument has not been established.
AGM9216_ERROR_UNKNOWN_CHANNEL_NAME | 0xBFFA0020 | -1074135008 | Unknown channel name.
AGM9216_ERROR_TOO_MANY_OPEN_FILES | 0xBFFA0023 | -1074135005 | Too many files are open.
AGM9216_ERROR_CHANNEL_NAME_REQUIRED | 0xBFFA0044 | -1074134972 | A channel name is required.
AGM9216_ERROR_MISSING_OPTION_NAME | 0xBFFA0049 | -1074134967 | The option string is missing an option name.
AGM9216_ERROR_MISSING_OPTION_VALUE | 0xBFFA004A | -1074134966 | The option string is missing an option value.
AGM9216_ERROR_BAD_OPTION_NAME | 0xBFFA004B | -1074134965 | The %1 name in the option string is unknown.
AGM9216_ERROR_BAD_OPTION_VALUE | 0xBFFA004C | -1074134964 | The %1 value in the option string is unknown.
AGM9216_ERROR_OUT_OF_MEMORY | 0xBFFA0056 | -1074134954 | Could not allocate necessary memory.
AGM9216_ERROR_OPERATION_PENDING | 0xBFFA0057 | -1074134953 | Operation in progress.
AGM9216_ERROR_NULL_POINTER | 0xBFFA0058 | -1074134952 | Null pointer passed for method %1, parameter %2.
AGM9216_ERROR_UNEXPECTED_RESPONSE | 0xBFFA0059 | -1074134951 | Unexpected response from instrument.
AGM9216_ERROR_FILE_NOT_FOUND | 0xBFFA005B | -1074134949 | File not found.
AGM9216_ERROR_INVALID_FILE_FORMAT | 0xBFFA005C | -1074134948 | Invalid file format.
AGM9216_ERROR_STATUS_NOT_AVAILABLE | 0xBFFA005D | -1074134947 | The instrument status is not available.
AGM9216_ERROR_ID_QUERY_FAILED | 0xBFFA005E | -1074134946 | Instrument ID query failed.
AGM9216_ERROR_RESET_FAILED | 0xBFFA005F | -1074134945 | Instrument reset failed.
AGM9216_ERROR_RESOURCE_UNKNOWN | 0xBFFA0060 | -1074134944 | Unknown resource.
AGM9216_ERROR_ALREADY_INITIALIZED | 0xBFFA0061 | -1074134943 | The driver is already initialized.
AGM9216_ERROR_CANNOT_CHANGE_SIMULATION_STATE | 0xBFFA0062 | -1074134942 | The simulation state cannot be changed.
AGM9216_ERROR_INVALID_NUMBER_OF_LEVELS_IN_SELECTOR | 0xBFFA0063 | -1074134941 | The number of levels in the selector is not valid for the %1 repeated capability.
AGM9216_ERROR_INVALID_RANGE_IN_SELECTOR | 0xBFFA0064 | -1074134940 | The range %1 is not valid for the repeated capability %2.
AGM9216_ERROR_UNKOWN_NAME_IN_SELECTOR | 0xBFFA0065 | -1074134939 | Unknown name in selector.
AGM9216_ERROR_BADLY_FORMED_SELECTOR | 0xBFFA0066 | -1074134938 | The repeated capability selector is badly-formed.
AGM9216_ERROR_UNKNOWN_PHYSICAL_IDENTIFIER | 0xBFFA0067 | -1074134937 | Unknown physical repeated capability selector.
AGM9216_ERROR_INVALID_CONFIGURE | 0xBFFA401B | -1074118629 |
AGM9216_ERROR_FETCHDATA_ERROR | 0xBFFA401C | -1074118628 |
AGM9216_ERROR_INVALID_MEASUREMENT_MODE | 0xBFFA401D | -1074118627 |
AGM9216_ERROR_INVALID_RECORD_SIZE | 0xBFFA401E | -1074118626 |
AGM9216_ERROR_INVALID_CONNECTOR | 0xBFFA401F | -1074118625 |
AGM9216_ERROR_INVALID_INPUT_PORT | 0xBFFA4020 | -1074118624 |
AGM9216_ERROR_INVALID_TRIGGER_TYPE | 0xBFFA4029 | -1074118615 |
AGM9216_ERROR_INVALID_HYSTERESIS_VALUE | 0xBFFA402A | -1074118614 |
AGM9216_ERROR_INVALID_LEVEL_VALUE | 0xBFFA402B | -1074118613 |
AGM9216_ERROR_INVALID_HOLDOFFCOUNT_VALUE | 0xBFFA402C | -1074118612 |
AGM9216_ERROR_INVALID_DELAY | 0xBFFA402D | -1074118611 |
AGM9216_ERROR_PERSONALITY_NOT_ACTIVE | 0xBFFA4211 | -1074118127 | Personality is not active.
AGM9216_ERROR_PERSONALITY_NOT_INSTALLED | 0xBFFA4212 | -1074118126 | Personality is not installed.
AGM9216_ERROR_PERSONALITY_NOT_LICENSED | 0xBFFA4213 | -1074118125 | Personality is not licensed.
AGM9216_ERROR_IO_GENERAL | 0xBFFA4214 | -1074118124 | I/O error.
AGM9216_ERROR_IO_TIMEOUT | 0xBFFA4215 | -1074118123 | I/O timeout error.
AGM9216_ERROR_MODEL_NOT_SUPPORTED | 0xBFFA4216 | -1074118122 | Instrument model does not support this feature.
Top

Warnings

Name | Value (Hex) | Value (Decimal) | Description
AGM9216_SUCCESS | 0x3FFA0000 | 1073348608 | Success.
AGM9216_WARN_NSUP_ID_QUERY | 0x3FFA0065 | 1073348709 | ID Query is not supported by this instrument.
AGM9216_WARN_NSUP_RESET | 0x3FFA0066 | 1073348710 | Reset is not supported by this instrument.
AGM9216_WARN_NSUP_SELF_TEST | 0x3FFA0067 | 1073348711 | Self test is not supported by this instrument.
AGM9216_WARN_NSUP_ERROR_QUERY | 0x3FFA0068 | 1073348712 | Error query is not supported by this instrument.
AGM9216_WARN_NSUP_REV_QUERY | 0x3FFA0069 | 1073348713 | Firmware revision query is not supported by this instrument.
Top


Copyright

[image]

AgM9216 IVI Driver Reference Agilent Technologies
Copyright

Agilent Technologies may have patents, patent applications, trademarks, copyrights, or other intellectual property rights covering subject matter in this document. Except as expressly provided in any written license agreement from Agilent Technologies, the furnishing of this document does not give you any license to these patents, trademarks, copyrights, or other intellectual property.

Copyright 2011 Agilent Technologies. All rights reserved.

The names of actual companies and products mentioned herein may be the trademarks of their respective owners.


Instrument Command Reference

[image]

AgM9216 IVI Driver Reference Agilent Technologies
Instrument Command Reference

This is the reference for all the instrument commands issued by the driver.

Instrument Commands

Instrument Command Reference
Top